mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Improve recovery on malformed format call
If a comma in a format call is replaced with a similar token, then we emit an error and continue parsing, instead of stopping at this point.
This commit is contained in:
parent
282c59820b
commit
246f1f8a8e
2 changed files with 3 additions and 3 deletions
|
@ -1,3 +1,3 @@
|
|||
fn main() {
|
||||
println!("{}" a); //~ERROR expected token: `,`
|
||||
println!("{}" a); //~ERROR expected `,`, found `a`
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
error: expected token: `,`
|
||||
error: expected `,`, found `a`
|
||||
--> $DIR/issue-3145.rs:2:19
|
||||
|
|
||||
LL | println!("{}" a); //~ERROR expected token: `,`
|
||||
LL | println!("{}" a); //~ERROR expected `,`, found `a`
|
||||
| ^ expected `,`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
|
Loading…
Add table
Reference in a new issue