2018-12-04 14:10:32 -05:00
|
|
|
error: requires at least a format string argument
|
2019-07-15 20:51:32 -07:00
|
|
|
--> $DIR/format-parse-errors.rs:4:5
|
2018-12-04 14:10:32 -05:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | format!();
|
2018-12-04 14:10:32 -05:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2019-12-16 15:56:47 +02:00
|
|
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-12-04 14:10:32 -05:00
|
|
|
|
|
|
|
error: expected expression, found keyword `struct`
|
2019-07-15 20:51:32 -07:00
|
|
|
--> $DIR/format-parse-errors.rs:5:13
|
2018-12-04 14:10:32 -05:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | format!(struct);
|
2018-12-04 14:10:32 -05:00
|
|
|
| ^^^^^^ expected expression
|
|
|
|
|
2019-05-21 17:47:23 -07:00
|
|
|
error: expected expression, found end of macro arguments
|
2019-07-15 20:51:32 -07:00
|
|
|
--> $DIR/format-parse-errors.rs:6:24
|
2018-12-04 14:10:32 -05:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | format!("s", name =);
|
2019-05-21 17:47:23 -07:00
|
|
|
| ^ expected expression
|
2018-12-04 14:10:32 -05:00
|
|
|
|
2019-07-15 20:51:32 -07:00
|
|
|
error: positional arguments cannot follow named arguments
|
|
|
|
--> $DIR/format-parse-errors.rs:10:9
|
2019-01-11 12:40:05 -05:00
|
|
|
|
|
2019-07-15 20:51:32 -07:00
|
|
|
LL | foo = foo,
|
|
|
|
| --- named argument
|
|
|
|
LL | bar,
|
|
|
|
| ^^^ positional arguments must be before named arguments
|
2019-01-11 12:40:05 -05:00
|
|
|
|
2018-12-04 14:10:32 -05:00
|
|
|
error: expected expression, found keyword `struct`
|
2019-07-15 20:51:32 -07:00
|
|
|
--> $DIR/format-parse-errors.rs:12:30
|
2018-12-04 14:10:32 -05:00
|
|
|
|
|
2019-07-15 20:51:32 -07:00
|
|
|
LL | format!("s {foo}", foo = struct);
|
|
|
|
| ^^^^^^ expected expression
|
2018-12-04 14:10:32 -05:00
|
|
|
|
|
|
|
error: expected expression, found keyword `struct`
|
2019-07-15 20:51:32 -07:00
|
|
|
--> $DIR/format-parse-errors.rs:13:18
|
2018-12-04 14:10:32 -05:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | format!("s", struct);
|
2018-12-04 14:10:32 -05:00
|
|
|
| ^^^^^^ expected expression
|
|
|
|
|
|
|
|
error: format argument must be a string literal
|
2019-07-15 20:51:32 -07:00
|
|
|
--> $DIR/format-parse-errors.rs:16:13
|
2018-12-04 14:10:32 -05:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | format!(123);
|
2018-12-04 14:10:32 -05:00
|
|
|
| ^^^
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2018-12-04 14:10:32 -05:00
|
|
|
help: you might be missing a string literal to format with
|
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | format!("{}", 123);
|
2018-12-04 14:10:32 -05:00
|
|
|
| ^^^^^
|
|
|
|
|
2019-01-11 12:40:05 -05:00
|
|
|
error: aborting due to 7 previous errors
|
2018-12-04 14:10:32 -05:00
|
|
|
|