Skip to content

Commit 506c066

Browse files
committed
Removing redudant note from parse error
1 parent 5b30586 commit 506c066

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

compiler/rustc_parse_format/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ impl<'a> Parser<'a> {
893893
0,
894894
ParseError {
895895
description: "expected format parameter to occur after `:`".to_owned(),
896-
note: Some(format!("`{}` comes after `:`.", alignment)),
896+
note: None,
897897
label: format!("expected `{}` to occur after `:`", alignment).to_owned(),
898898
span: pos.to(pos),
899899
secondary_label: None,

tests/ui/fmt/format-string-wrong-order.stderr

-6
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,18 @@ error: invalid format string: expected format parameter to occur after `:`
5555
|
5656
LL | format!("Hello {<5:}!", "x");
5757
| ^ expected `<` to occur after `:` in format string
58-
|
59-
= note: `<` comes after `:`.
6058

6159
error: invalid format string: expected format parameter to occur after `:`
6260
--> $DIR/format-string-wrong-order.rs:17:21
6361
|
6462
LL | format!("Hello {^5:}!", "x");
6563
| ^ expected `^` to occur after `:` in format string
66-
|
67-
= note: `^` comes after `:`.
6864

6965
error: invalid format string: expected format parameter to occur after `:`
7066
--> $DIR/format-string-wrong-order.rs:19:21
7167
|
7268
LL | format!("Hello {>5:}!", "x");
7369
| ^ expected `>` to occur after `:` in format string
74-
|
75-
= note: `>` comes after `:`.
7670

7771
error: aborting due to 9 previous errors
7872

0 commit comments

Comments
 (0)