]>
Commit | Line | Data |
---|---|---|
0731742a | 1 | error: requires at least a format string argument |
416331ca | 2 | --> $DIR/format-parse-errors.rs:4:5 |
0731742a | 3 | | |
532ac7d7 | 4 | LL | format!(); |
0731742a XL |
5 | | ^^^^^^^^^^ |
6 | | | |
74b04a01 | 7 | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) |
0731742a XL |
8 | |
9 | error: expected expression, found keyword `struct` | |
416331ca | 10 | --> $DIR/format-parse-errors.rs:5:13 |
0731742a | 11 | | |
532ac7d7 | 12 | LL | format!(struct); |
0731742a XL |
13 | | ^^^^^^ expected expression |
14 | ||
dc9dc135 | 15 | error: expected expression, found end of macro arguments |
416331ca | 16 | --> $DIR/format-parse-errors.rs:6:24 |
0731742a | 17 | | |
532ac7d7 | 18 | LL | format!("s", name =); |
dc9dc135 | 19 | | ^ expected expression |
0731742a | 20 | |
416331ca XL |
21 | error: positional arguments cannot follow named arguments |
22 | --> $DIR/format-parse-errors.rs:10:9 | |
0731742a | 23 | | |
416331ca XL |
24 | LL | foo = foo, |
25 | | --- named argument | |
26 | LL | bar, | |
27 | | ^^^ positional arguments must be before named arguments | |
0731742a XL |
28 | |
29 | error: expected expression, found keyword `struct` | |
416331ca | 30 | --> $DIR/format-parse-errors.rs:12:30 |
0731742a | 31 | | |
416331ca XL |
32 | LL | format!("s {foo}", foo = struct); |
33 | | ^^^^^^ expected expression | |
0731742a XL |
34 | |
35 | error: expected expression, found keyword `struct` | |
416331ca | 36 | --> $DIR/format-parse-errors.rs:13:18 |
0731742a | 37 | | |
532ac7d7 | 38 | LL | format!("s", struct); |
0731742a XL |
39 | | ^^^^^^ expected expression |
40 | ||
41 | error: format argument must be a string literal | |
416331ca | 42 | --> $DIR/format-parse-errors.rs:16:13 |
0731742a | 43 | | |
532ac7d7 | 44 | LL | format!(123); |
0731742a | 45 | | ^^^ |
e74abb32 | 46 | | |
0731742a XL |
47 | help: you might be missing a string literal to format with |
48 | | | |
532ac7d7 | 49 | LL | format!("{}", 123); |
0731742a XL |
50 | | ^^^^^ |
51 | ||
52 | error: aborting due to 7 previous errors | |
53 |