Be accurate on format! parse error expectations
This commit is contained in:
parent
fba38ac27e
commit
4dec571ec6
5 changed files with 18 additions and 10 deletions
|
|
@ -1,5 +1,5 @@
|
|||
fn main() {
|
||||
format!(); //~ ERROR requires at least a format string argument
|
||||
format!("" 1); //~ ERROR expected token: `,`
|
||||
format!("", 1 1); //~ ERROR expected token: `,`
|
||||
format!("", 1 1); //~ ERROR expected one of
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ error: expected token: `,`
|
|||
LL | format!("" 1);
|
||||
| ^ expected `,`
|
||||
|
||||
error: expected token: `,`
|
||||
error: expected one of `,`, `.`, `?`, or an operator, found `1`
|
||||
--> $DIR/bad-format-args.rs:4:19
|
||||
|
|
||||
LL | format!("", 1 1);
|
||||
| ^ expected `,`
|
||||
| ^ expected one of `,`, `.`, `?`, or an operator here
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue