mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 20:54:13 +00:00
f922c8395d
Adding Adding Fixing small issues for PR Adding tests Removing unused binding Changing the wording on note Fixing PR comment
55 lines
1.8 KiB
Plaintext
55 lines
1.8 KiB
Plaintext
error: invalid format string: expected format parameter to occur after `:`
|
|
--> $DIR/format-string-wrong-order.rs:3:15
|
|
|
|
|
LL | format!("{?:}", bar);
|
|
| ^ expected `?` to occur after `:` in format string
|
|
|
|
|
= note: `?` comes after `:`, try `:?` instead
|
|
|
|
error: invalid format string: expected format parameter to occur after `:`
|
|
--> $DIR/format-string-wrong-order.rs:5:15
|
|
|
|
|
LL | format!("{?:bar}");
|
|
| ^ expected `?` to occur after `:` in format string
|
|
|
|
|
= note: `?` comes after `:`, try `bar:?` instead
|
|
|
|
error: invalid format string: expected format parameter to occur after `:`
|
|
--> $DIR/format-string-wrong-order.rs:7:15
|
|
|
|
|
LL | format!("{?:?}", bar);
|
|
| ^ expected `?` to occur after `:` in format string
|
|
|
|
|
= note: `?` comes after `:`, try `:?` instead
|
|
|
|
error: invalid format string: expected `'}'`, found `'?'`
|
|
--> $DIR/format-string-wrong-order.rs:9:15
|
|
|
|
|
LL | format!("{??}", bar);
|
|
| -^ expected `}` in format string
|
|
| |
|
|
| because of this opening brace
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
error: invalid format string: expected `'}'`, found `'?'`
|
|
--> $DIR/format-string-wrong-order.rs:11:15
|
|
|
|
|
LL | format!("{?;bar}");
|
|
| -^ expected `}` in format string
|
|
| |
|
|
| because of this opening brace
|
|
|
|
|
= note: if you intended to print `{`, you can escape it using `{{`
|
|
|
|
error: invalid format string: expected format parameter to occur after `:`
|
|
--> $DIR/format-string-wrong-order.rs:13:15
|
|
|
|
|
LL | format!("{?:#?}", bar);
|
|
| ^ expected `?` to occur after `:` in format string
|
|
|
|
|
= note: `?` comes after `:`, try `:?` instead
|
|
|
|
error: aborting due to 6 previous errors
|
|
|