From fdbaaac245673d8dbf7bcc21ebedc833693434f6 Mon Sep 17 00:00:00 2001 From: Nilotpal Gupta Date: Tue, 19 Aug 2025 11:10:32 +0530 Subject: Fix format string grammar in docs and improve alignment error message --- compiler/rustc_parse_format/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_parse_format/src') diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs index 8e4da7923fc..5cda0b813d2 100644 --- a/compiler/rustc_parse_format/src/lib.rs +++ b/compiler/rustc_parse_format/src/lib.rs @@ -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, -- cgit 1.4.1-3-g733a5