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