|
| 1 | +warning: Panic message contains a brace |
| 2 | + --> $DIR/panic-brace.rs:5:5 |
| 3 | + | |
| 4 | +LL | panic!("here's a brace: {"); |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: `#[warn(panic_fmt)]` on by default |
| 8 | + = note: This message is not used as a format string, but will be in a future Rust version |
| 9 | +help: add a "{}" format string to use the message literally |
| 10 | + | |
| 11 | +LL | panic!("{}", "here's a brace: {"); |
| 12 | + | ^^^^^ |
| 13 | + |
| 14 | +warning: Panic message contains a brace |
| 15 | + --> $DIR/panic-brace.rs:6:5 |
| 16 | + | |
| 17 | +LL | std::panic!("another one: }"); |
| 18 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 19 | + | |
| 20 | + = note: This message is not used as a format string, but will be in a future Rust version |
| 21 | +help: add a "{}" format string to use the message literally |
| 22 | + | |
| 23 | +LL | std::panic!("{}", "another one: }"); |
| 24 | + | ^^^^^ |
| 25 | + |
| 26 | +warning: Panic message contains a brace |
| 27 | + --> $DIR/panic-brace.rs:7:5 |
| 28 | + | |
| 29 | +LL | core::panic!("Hello { { {"); |
| 30 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 31 | + | |
| 32 | + = note: This message is not used as a format string, but will be in a future Rust version |
| 33 | +help: add a "{}" format string to use the message literally |
| 34 | + | |
| 35 | +LL | core::panic!("{}", "Hello { { {"); |
| 36 | + | ^^^^^ |
| 37 | + |
| 38 | +warning: Panic message contains a brace |
| 39 | + --> $DIR/panic-brace.rs:8:5 |
| 40 | + | |
| 41 | +LL | assert!(false, "} } }..."); |
| 42 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 43 | + | |
| 44 | + = note: This message is not used as a format string, but will be in a future Rust version |
| 45 | +help: add a "{}" format string to use the message literally |
| 46 | + | |
| 47 | +LL | assert!(false, "{}", "} } }..."); |
| 48 | + | ^^^^^ |
| 49 | + |
| 50 | +warning: 4 warnings emitted |
| 51 | + |
0 commit comments