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:
Sasha 2020-08-31 11:45:50 +02:00
parent 282c59820b
commit 246f1f8a8e
2 changed files with 3 additions and 3 deletions

View File

@ -1,3 +1,3 @@
fn main() {
println!("{}" a); //~ERROR expected token: `,`
println!("{}" a); //~ERROR expected `,`, found `a`
}

View File

@ -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