2018-12-04 19:10:32 +00:00
|
|
|
error: requires at least a format string argument
|
2019-07-16 03:51:32 +00:00
|
|
|
--> $DIR/format-parse-errors.rs:4:5
|
2018-12-04 19:10:32 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | format!();
|
2018-12-04 19:10:32 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2021-02-13 19:52:25 +00:00
|
|
|
= note: this error originates in the macro `$crate::__export::format_args` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-12-04 19:10:32 +00:00
|
|
|
|
|
|
|
error: expected expression, found keyword `struct`
|
2019-07-16 03:51:32 +00:00
|
|
|
--> $DIR/format-parse-errors.rs:5:13
|
2018-12-04 19:10:32 +00:00
|
|
|
|
|
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
|
2019-07-16 03:51:32 +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", name =);
|
2019-05-22 00:47:23 +00:00
|
|
|
| ^ expected expression
|
2018-12-04 19:10:32 +00:00
|
|
|
|
2019-07-16 03:51:32 +00:00
|
|
|
error: positional arguments cannot follow named arguments
|
|
|
|
--> $DIR/format-parse-errors.rs:10:9
|
2019-01-11 17:40:05 +00:00
|
|
|
|
|
2019-07-16 03:51:32 +00:00
|
|
|
LL | foo = foo,
|
|
|
|
| --- named argument
|
|
|
|
LL | bar,
|
|
|
|
| ^^^ positional arguments must be before named arguments
|
2019-01-11 17:40:05 +00:00
|
|
|
|
2018-12-04 19:10:32 +00:00
|
|
|
error: expected expression, found keyword `struct`
|
2019-07-16 03:51:32 +00:00
|
|
|
--> $DIR/format-parse-errors.rs:12:30
|
2018-12-04 19:10:32 +00:00
|
|
|
|
|
2019-07-16 03:51:32 +00:00
|
|
|
LL | format!("s {foo}", foo = struct);
|
|
|
|
| ^^^^^^ expected expression
|
2018-12-04 19:10:32 +00:00
|
|
|
|
|
|
|
error: expected expression, found keyword `struct`
|
2019-07-16 03:51:32 +00:00
|
|
|
--> $DIR/format-parse-errors.rs:13: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-07-16 03:51:32 +00:00
|
|
|
--> $DIR/format-parse-errors.rs:16: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
|
|
|
| ^^^
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
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);
|
2021-06-22 02:07:19 +00:00
|
|
|
| +++++
|
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
|
|
|
|