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
@ -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…
Reference in New Issue
Block a user