@@ -23,28 +23,36 @@ help: add a "{}" format string to use the message literally
23
23
LL | std::panic!("{}", "another one: }");
24
24
| ^^^^^
25
25
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
28
28
|
29
- LL | core::panic!("Hello { { { ");
30
- | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^
29
+ LL | core::panic!("Hello {} ");
30
+ | ^^^^^^^^^^
31
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
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
34
38
|
35
- LL | core::panic!("{}", "Hello { { { ");
39
+ LL | core::panic!("{}", "Hello {} ");
36
40
| ^^^^^
37
41
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
40
44
|
41
- LL | assert!(false, "} } }... ");
42
- | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^
45
+ LL | assert!(false, "{:03x} bla ");
46
+ | ^^^^^^^^^^^^
43
47
|
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
46
54
|
47
- LL | assert!(false, "{}", "} } }... ");
55
+ LL | assert!(false, "{}", "{:03x} bla ");
48
56
| ^^^^^
49
57
50
58
warning: 4 warnings emitted
0 commit comments