Fix format string grammar in docs and improve alignment error message

This commit is contained in:
Nilotpal Gupta
2025-08-19 11:10:32 +05:30
parent 269d5b56bc
commit fdbaaac245
4 changed files with 19 additions and 9 deletions

View File

@@ -858,7 +858,9 @@ impl<'input> Parser<'input> {
self.errors.insert(
0,
ParseError {
description: "expected format parameter to occur after `:`".to_owned(),
description:
"expected alignment specifier after `:` in format string; example: `{:>?}`"
.to_owned(),
note: None,
label: format!("expected `{}` to occur after `:`", alignment),
span: range,