2018-12-04 19:10:32 +00:00
|
|
|
error: requires at least a format string argument
|
|
|
|
--> $DIR/format-parse-errors.rs:2:5
|
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | format!();
|
2018-12-04 19:10:32 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: expected expression, found keyword `struct`
|
|
|
|
--> $DIR/format-parse-errors.rs:3:13
|
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | format!(struct);
|
2018-12-04 19:10:32 +00:00
|
|
|
| ^^^^^^ expected expression
|
|
|
|
|
2019-05-22 00:47:23 +00:00
|
|
|
error: expected expression, found end of macro arguments
|
|
|
|
--> $DIR/format-parse-errors.rs:4:24
|
2018-12-04 19:10:32 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | format!("s", name =);
|
2019-05-22 00:47:23 +00:00
|
|
|
| ^ expected expression
|
2018-12-04 19:10:32 +00:00
|
|
|
|
2019-05-22 00:47:23 +00:00
|
|
|
error: expected `=`, found end of macro arguments
|
|
|
|
--> $DIR/format-parse-errors.rs:5:32
|
2019-01-11 17:40:05 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | format!("s", foo = foo, bar);
|
2019-05-22 00:47:23 +00:00
|
|
|
| ^ expected `=`
|
2019-01-11 17:40:05 +00:00
|
|
|
|
2018-12-04 19:10:32 +00:00
|
|
|
error: expected expression, found keyword `struct`
|
2019-01-11 17:40:05 +00:00
|
|
|
--> $DIR/format-parse-errors.rs:6:24
|
2018-12-04 19:10:32 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | format!("s", foo = struct);
|
2018-12-04 19:10:32 +00:00
|
|
|
| ^^^^^^ expected expression
|
|
|
|
|
|
|
|
error: expected expression, found keyword `struct`
|
2019-01-11 17:40:05 +00:00
|
|
|
--> $DIR/format-parse-errors.rs:7:18
|
2018-12-04 19:10:32 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | format!("s", struct);
|
2018-12-04 19:10:32 +00:00
|
|
|
| ^^^^^^ expected expression
|
|
|
|
|
|
|
|
error: format argument must be a string literal
|
2019-01-11 17:40:05 +00:00
|
|
|
--> $DIR/format-parse-errors.rs:10:13
|
2018-12-04 19:10:32 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | format!(123);
|
2018-12-04 19:10:32 +00:00
|
|
|
| ^^^
|
|
|
|
help: you might be missing a string literal to format with
|
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | format!("{}", 123);
|
2018-12-04 19:10:32 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
2019-01-11 17:40:05 +00:00
|
|
|
error: aborting due to 7 previous errors
|
2018-12-04 19:10:32 +00:00
|
|
|
|