|
| 1 | +error: invalid format string: expected format parameter to occur after `:` |
| 2 | + --> $DIR/format-string-wrong-order.rs:3:15 |
| 3 | + | |
| 4 | +LL | format!("{?:}", bar); |
| 5 | + | ^ expected `?` to occur after `:` in format string |
| 6 | + | |
| 7 | + = note: `?` comes after `:`, try `:?` instead |
| 8 | + |
| 9 | +error: invalid format string: expected format parameter to occur after `:` |
| 10 | + --> $DIR/format-string-wrong-order.rs:5:15 |
| 11 | + | |
| 12 | +LL | format!("{?:bar}"); |
| 13 | + | ^ expected `?` to occur after `:` in format string |
| 14 | + | |
| 15 | + = note: `?` comes after `:`, try `bar:?` instead |
| 16 | + |
| 17 | +error: invalid format string: expected format parameter to occur after `:` |
| 18 | + --> $DIR/format-string-wrong-order.rs:7:15 |
| 19 | + | |
| 20 | +LL | format!("{?:?}", bar); |
| 21 | + | ^ expected `?` to occur after `:` in format string |
| 22 | + | |
| 23 | + = note: `?` comes after `:`, try `:?` instead |
| 24 | + |
| 25 | +error: invalid format string: expected `'}'`, found `'?'` |
| 26 | + --> $DIR/format-string-wrong-order.rs:9:15 |
| 27 | + | |
| 28 | +LL | format!("{??}", bar); |
| 29 | + | -^ expected `}` in format string |
| 30 | + | | |
| 31 | + | because of this opening brace |
| 32 | + | |
| 33 | + = note: if you intended to print `{`, you can escape it using `{{` |
| 34 | + |
| 35 | +error: invalid format string: expected `'}'`, found `'?'` |
| 36 | + --> $DIR/format-string-wrong-order.rs:11:15 |
| 37 | + | |
| 38 | +LL | format!("{?;bar}"); |
| 39 | + | -^ expected `}` in format string |
| 40 | + | | |
| 41 | + | because of this opening brace |
| 42 | + | |
| 43 | + = note: if you intended to print `{`, you can escape it using `{{` |
| 44 | + |
| 45 | +error: invalid format string: expected format parameter to occur after `:` |
| 46 | + --> $DIR/format-string-wrong-order.rs:13:15 |
| 47 | + | |
| 48 | +LL | format!("{?:#?}", bar); |
| 49 | + | ^ expected `?` to occur after `:` in format string |
| 50 | + | |
| 51 | + = note: `?` comes after `:`, try `:?` instead |
| 52 | + |
| 53 | +error: aborting due to 6 previous errors |
| 54 | + |
0 commit comments