2023-01-08 22:48:41 +00:00
|
|
|
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);
|
2023-07-17 00:32:13 +00:00
|
|
|
| -^ expected `'}'` in format string
|
2023-01-08 22:48:41 +00:00
|
|
|
| |
|
|
|
|
| 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}");
|
2023-07-17 00:32:13 +00:00
|
|
|
| -^ expected `'}'` in format string
|
2023-01-08 22:48:41 +00:00
|
|
|
| |
|
|
|
|
| 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
|
|
|
|
|
2024-01-07 19:39:46 +00:00
|
|
|
error: invalid format string: expected format parameter to occur after `:`
|
|
|
|
--> $DIR/format-string-wrong-order.rs:15:21
|
|
|
|
|
|
|
|
|
LL | format!("Hello {<5:}!", "x");
|
|
|
|
| ^ expected `<` to occur after `:` in format string
|
|
|
|
|
|
|
|
error: invalid format string: expected format parameter to occur after `:`
|
|
|
|
--> $DIR/format-string-wrong-order.rs:17:21
|
|
|
|
|
|
|
|
|
LL | format!("Hello {^5:}!", "x");
|
|
|
|
| ^ expected `^` to occur after `:` in format string
|
|
|
|
|
|
|
|
error: invalid format string: expected format parameter to occur after `:`
|
|
|
|
--> $DIR/format-string-wrong-order.rs:19:21
|
|
|
|
|
|
|
|
|
LL | format!("Hello {>5:}!", "x");
|
|
|
|
| ^ expected `>` to occur after `:` in format string
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
2023-01-08 22:48:41 +00:00
|
|
|
|