@@ -23,28 +23,36 @@ help: add a "{}" format string to use the message literally
2323LL | std::panic!("{}", "another one: }");
2424 | ^^^^^
2525
26- warning: Panic message contains a brace
27- --> $DIR/panic-brace.rs:7:5
26+ warning: Panic message contains an unused formatting placeholder
27+ --> $DIR/panic-brace.rs:7:18
2828 |
29- LL | core::panic!("Hello { { { ");
30- | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^
29+ LL | core::panic!("Hello {} ");
30+ | ^^^^^^^^^^
3131 |
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
32+ = note: This message is not used as a format string when given without arguments, but will be in a future Rust version
33+ help: add the missing argument(s)
34+ |
35+ LL | core::panic!("Hello {}", argument);
36+ | ^^^^^^^^^^
37+ help: or add a "{}" format string to use the message literally
3438 |
35- LL | core::panic!("{}", "Hello { { { ");
39+ LL | core::panic!("{}", "Hello {} ");
3640 | ^^^^^
3741
38- warning: Panic message contains a brace
39- --> $DIR/panic-brace.rs:8:5
42+ warning: Panic message contains an unused formatting placeholder
43+ --> $DIR/panic-brace.rs:8:20
4044 |
41- LL | assert!(false, "} } }... ");
42- | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^
45+ LL | assert!(false, "{:03x} bla ");
46+ | ^^^^^^^^^^^^
4347 |
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
48+ = note: This message is not used as a format string when given without arguments, but will be in a future Rust version
49+ help: add the missing argument(s)
50+ |
51+ LL | assert!(false, "{:03x} bla", argument);
52+ | ^^^^^^^^^^
53+ help: or add a "{}" format string to use the message literally
4654 |
47- LL | assert!(false, "{}", "} } }... ");
55+ LL | assert!(false, "{}", "{:03x} bla ");
4856 | ^^^^^
4957
5058warning: 4 warnings emitted
0 commit comments