mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 13:40:15 +03:00
95 lines
3.4 KiB
Plaintext
95 lines
3.4 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: invalid format string: expected alignment specifier after `:` in format string; example: `{:>?}`
|
|
--> $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 alignment specifier after `:` in format string; example: `{:>?}`
|
|
--> $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 alignment specifier after `:` in format string; example: `{:>?}`
|
|
--> $DIR/format-string-wrong-order.rs:19:21
|
|
|
|
|
LL | format!("Hello {>5:}!", "x");
|
|
| ^ expected `>` to occur after `:` in format string
|
|
|
|
error: invalid format string: expected alignment specifier after `:` in format string; example: `{:>?}`
|
|
--> $DIR/format-string-wrong-order.rs:21:20
|
|
|
|
|
LL | println!("{0:#X>18}", 12345);
|
|
| ^ expected `>` to occur after `:` in format string
|
|
|
|
error: invalid format string: the `+` sign flag must appear after `:` in a format string
|
|
--> $DIR/format-string-wrong-order.rs:23:15
|
|
|
|
|
LL | format!("{+:}");
|
|
| ^ expected `:` before `+` sign flag in format string
|
|
|
|
|
= note: `+` comes after `:`, try `{:+}` instead of `{+}`
|
|
|
|
error: invalid format string: the `+` sign flag must appear after `:` in a format string
|
|
--> $DIR/format-string-wrong-order.rs:25:18
|
|
|
|
|
LL | format!("{bar+:}");
|
|
| ^ expected `:` before `+` sign flag in format string
|
|
|
|
|
= note: `+` comes after `:`, try `{:+}` instead of `{+}`
|
|
|
|
error: aborting due to 12 previous errors
|
|
|