Skip to content

Commit

Permalink
Removing redudant note from parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
madsravn committed Jan 8, 2024
1 parent 5b30586 commit 506c066
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_parse_format/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ impl<'a> Parser<'a> {
0,
ParseError {
description: "expected format parameter to occur after `:`".to_owned(),
note: Some(format!("`{}` comes after `:`.", alignment)),
note: None,
label: format!("expected `{}` to occur after `:`", alignment).to_owned(),
span: pos.to(pos),
secondary_label: None,
Expand Down
6 changes: 0 additions & 6 deletions tests/ui/fmt/format-string-wrong-order.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,18 @@ error: invalid format string: expected format parameter to occur after `:`
|
LL | format!("Hello {<5:}!", "x");
| ^ expected `<` to occur after `:` in format string
|
= note: `<` comes after `:`.

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

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

error: aborting due to 9 previous errors

0 comments on commit 506c066

Please sign in to comment.