11warning: panic message contains a brace
2- --> $DIR/non-fmt-panic.rs:11 :29
2+ --> $DIR/non-fmt-panic.rs:13 :29
33 |
44LL | panic!("here's a brace: {");
55 | ^
@@ -12,7 +12,7 @@ LL | panic!("{}", "here's a brace: {");
1212 | +++++
1313
1414warning: panic message contains a brace
15- --> $DIR/non-fmt-panic.rs:12 :31
15+ --> $DIR/non-fmt-panic.rs:14 :31
1616 |
1717LL | std::panic!("another one: }");
1818 | ^
@@ -24,7 +24,7 @@ LL | std::panic!("{}", "another one: }");
2424 | +++++
2525
2626warning: panic message contains an unused formatting placeholder
27- --> $DIR/non-fmt-panic.rs:13 :25
27+ --> $DIR/non-fmt-panic.rs:15 :25
2828 |
2929LL | core::panic!("Hello {}");
3030 | ^^
@@ -40,7 +40,7 @@ LL | core::panic!("{}", "Hello {}");
4040 | +++++
4141
4242warning: panic message contains unused formatting placeholders
43- --> $DIR/non-fmt-panic.rs:14 :21
43+ --> $DIR/non-fmt-panic.rs:16 :21
4444 |
4545LL | assert!(false, "{:03x} {test} bla");
4646 | ^^^^^^ ^^^^^^
@@ -56,7 +56,7 @@ LL | assert!(false, "{}", "{:03x} {test} bla");
5656 | +++++
5757
5858warning: panic message is not a string literal
59- --> $DIR/non-fmt-panic.rs:16 :20
59+ --> $DIR/non-fmt-panic.rs:18 :20
6060 |
6161LL | assert!(false, S);
6262 | ^
@@ -69,7 +69,7 @@ LL | assert!(false, "{}", S);
6969 | +++++
7070
7171warning: panic message contains braces
72- --> $DIR/non-fmt-panic.rs:18 :27
72+ --> $DIR/non-fmt-panic.rs:20 :27
7373 |
7474LL | debug_assert!(false, "{{}} bla");
7575 | ^^^^
@@ -81,7 +81,7 @@ LL | debug_assert!(false, "{}", "{{}} bla");
8181 | +++++
8282
8383warning: panic message is not a string literal
84- --> $DIR/non-fmt-panic.rs:19 :12
84+ --> $DIR/non-fmt-panic.rs:21 :12
8585 |
8686LL | panic!(C);
8787 | ^
@@ -92,13 +92,9 @@ help: add a "{}" format string to Display the message
9292 |
9393LL | panic!("{}", C);
9494 | +++++
95- help: or use std::panic::panic_any instead
96- |
97- LL | std::panic::panic_any(C);
98- | ~~~~~~~~~~~~~~~~~~~~~
9995
10096warning: panic message is not a string literal
101- --> $DIR/non-fmt-panic.rs:20 :12
97+ --> $DIR/non-fmt-panic.rs:22 :12
10298 |
10399LL | panic!(S);
104100 | ^
@@ -109,13 +105,9 @@ help: add a "{}" format string to Display the message
109105 |
110106LL | panic!("{}", S);
111107 | +++++
112- help: or use std::panic::panic_any instead
113- |
114- LL | std::panic::panic_any(S);
115- | ~~~~~~~~~~~~~~~~~~~~~
116108
117109warning: panic message is not a string literal
118- --> $DIR/non-fmt-panic.rs:21 :17
110+ --> $DIR/non-fmt-panic.rs:23 :17
119111 |
120112LL | std::panic!(123);
121113 | ^^^
@@ -132,7 +124,7 @@ LL | std::panic::panic_any(123);
132124 | ~~~~~~~~~~~~~~~~~~~~~
133125
134126warning: panic message is not a string literal
135- --> $DIR/non-fmt-panic.rs:22 :18
127+ --> $DIR/non-fmt-panic.rs:24 :18
136128 |
137129LL | core::panic!(&*"abc");
138130 | ^^^^^^^
@@ -145,7 +137,7 @@ LL | core::panic!("{}", &*"abc");
145137 | +++++
146138
147139warning: panic message contains an unused formatting placeholder
148- --> $DIR/non-fmt-panic.rs:23 :12
140+ --> $DIR/non-fmt-panic.rs:25 :12
149141 |
150142LL | panic!(concat!("{", "}"));
151143 | ^^^^^^^^^^^^^^^^^
@@ -161,7 +153,7 @@ LL | panic!("{}", concat!("{", "}"));
161153 | +++++
162154
163155warning: panic message contains braces
164- --> $DIR/non-fmt-panic.rs:24 :5
156+ --> $DIR/non-fmt-panic.rs:26 :5
165157 |
166158LL | panic!(concat!("{", "{"));
167159 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -173,15 +165,15 @@ LL | panic!("{}", concat!("{", "{"));
173165 | +++++
174166
175167warning: panic message contains an unused formatting placeholder
176- --> $DIR/non-fmt-panic.rs:26 :37
168+ --> $DIR/non-fmt-panic.rs:28 :37
177169 |
178170LL | fancy_panic::fancy_panic!("test {} 123");
179171 | ^^
180172 |
181173 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
182174
183175warning: panic message is not a string literal
184- --> $DIR/non-fmt-panic.rs:36 :12
176+ --> $DIR/non-fmt-panic.rs:38 :12
185177 |
186178LL | panic!(a!());
187179 | ^^^^
@@ -198,7 +190,7 @@ LL | std::panic::panic_any(a!());
198190 | ~~~~~~~~~~~~~~~~~~~~~
199191
200192warning: panic message is not a string literal
201- --> $DIR/non-fmt-panic.rs:38 :12
193+ --> $DIR/non-fmt-panic.rs:40 :12
202194 |
203195LL | panic!(format!("{}", 1));
204196 | ^^^^^^^^^^^^^^^^
@@ -213,7 +205,7 @@ LL + panic!("{}", 1);
213205 |
214206
215207warning: panic message is not a string literal
216- --> $DIR/non-fmt-panic.rs:39 :20
208+ --> $DIR/non-fmt-panic.rs:41 :20
217209 |
218210LL | assert!(false, format!("{}", 1));
219211 | ^^^^^^^^^^^^^^^^
@@ -228,7 +220,7 @@ LL + assert!(false, "{}", 1);
228220 |
229221
230222warning: panic message is not a string literal
231- --> $DIR/non-fmt-panic.rs:40 :26
223+ --> $DIR/non-fmt-panic.rs:42 :26
232224 |
233225LL | debug_assert!(false, format!("{}", 1));
234226 | ^^^^^^^^^^^^^^^^
@@ -243,7 +235,7 @@ LL + debug_assert!(false, "{}", 1);
243235 |
244236
245237warning: panic message is not a string literal
246- --> $DIR/non-fmt-panic.rs:42 :12
238+ --> $DIR/non-fmt-panic.rs:44 :12
247239 |
248240LL | panic![123];
249241 | ^^^
@@ -260,7 +252,7 @@ LL | std::panic::panic_any(123);
260252 | ~~~~~~~~~~~~~~~~~~~~~~ ~
261253
262254warning: panic message is not a string literal
263- --> $DIR/non-fmt-panic.rs:43 :12
255+ --> $DIR/non-fmt-panic.rs:45 :12
264256 |
265257LL | panic!{123};
266258 | ^^^
0 commit comments