1 warning: panic message contains a brace
2 --> $DIR/non-fmt-panic.rs:13:29
4 LL | panic!("here's a brace: {");
7 = note: `#[warn(non_fmt_panics)]` on by default
8 = note: this message is not used as a format string, but will be in Rust 2021
9 help: add a "{}" format string to use the message literally
11 LL | panic!("{}", "here's a brace: {");
14 warning: panic message contains a brace
15 --> $DIR/non-fmt-panic.rs:14:35
17 LL | unreachable!("here's a brace: {");
20 = note: this message is not used as a format string, but will be in Rust 2021
21 help: add a "{}" format string to use the message literally
23 LL | unreachable!("{}", "here's a brace: {");
26 warning: panic message contains a brace
27 --> $DIR/non-fmt-panic.rs:15:31
29 LL | std::panic!("another one: }");
32 = note: this message is not used as a format string, but will be in Rust 2021
33 help: add a "{}" format string to use the message literally
35 LL | std::panic!("{}", "another one: }");
38 warning: panic message contains an unused formatting placeholder
39 --> $DIR/non-fmt-panic.rs:16:25
41 LL | core::panic!("Hello {}");
44 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
45 help: add the missing argument
47 LL | core::panic!("Hello {}", ...);
49 help: or add a "{}" format string to use the message literally
51 LL | core::panic!("{}", "Hello {}");
54 warning: panic message contains unused formatting placeholders
55 --> $DIR/non-fmt-panic.rs:17:21
57 LL | assert!(false, "{:03x} {test} bla");
60 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
61 help: add the missing arguments
63 LL | assert!(false, "{:03x} {test} bla", ...);
65 help: or add a "{}" format string to use the message literally
67 LL | assert!(false, "{}", "{:03x} {test} bla");
70 warning: panic message is not a string literal
71 --> $DIR/non-fmt-panic.rs:19:20
73 LL | assert!(false, S);
76 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
77 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
78 help: add a "{}" format string to Display the message
80 LL | assert!(false, "{}", S);
83 warning: panic message is not a string literal
84 --> $DIR/non-fmt-panic.rs:21:20
86 LL | assert!(false, 123);
89 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
90 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
91 help: add a "{}" format string to Display the message
93 LL | assert!(false, "{}", 123);
96 warning: panic message is not a string literal
97 --> $DIR/non-fmt-panic.rs:23:20
99 LL | assert!(false, Some(123));
102 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
103 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
104 help: add a "{:?}" format string to use the Debug implementation of `Option<i32>`
106 LL | assert!(false, "{:?}", Some(123));
109 warning: panic message contains braces
110 --> $DIR/non-fmt-panic.rs:25:27
112 LL | debug_assert!(false, "{{}} bla");
115 = note: this message is not used as a format string, but will be in Rust 2021
116 help: add a "{}" format string to use the message literally
118 LL | debug_assert!(false, "{}", "{{}} bla");
121 warning: panic message is not a string literal
122 --> $DIR/non-fmt-panic.rs:26:12
127 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
128 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
129 help: add a "{}" format string to Display the message
131 LL | panic!("{}", C);
134 warning: panic message is not a string literal
135 --> $DIR/non-fmt-panic.rs:27:12
140 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
141 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
142 help: add a "{}" format string to Display the message
144 LL | panic!("{}", S);
147 warning: panic message is not a string literal
148 --> $DIR/non-fmt-panic.rs:28:18
150 LL | unreachable!(S);
153 = note: this usage of unreachable!() is deprecated; it will be a hard error in Rust 2021
154 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
155 help: add a "{}" format string to Display the message
157 LL | unreachable!("{}", S);
160 warning: panic message is not a string literal
161 --> $DIR/non-fmt-panic.rs:29:18
163 LL | unreachable!(S);
166 = note: this usage of unreachable!() is deprecated; it will be a hard error in Rust 2021
167 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
168 help: add a "{}" format string to Display the message
170 LL | unreachable!("{}", S);
173 warning: panic message is not a string literal
174 --> $DIR/non-fmt-panic.rs:30:17
176 LL | std::panic!(123);
179 = note: this usage of std::panic!() is deprecated; it will be a hard error in Rust 2021
180 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
181 help: add a "{}" format string to Display the message
183 LL | std::panic!("{}", 123);
185 help: or use std::panic::panic_any instead
187 LL | std::panic::panic_any(123);
188 | ~~~~~~~~~~~~~~~~~~~~~
190 warning: panic message is not a string literal
191 --> $DIR/non-fmt-panic.rs:31:18
193 LL | core::panic!(&*"abc");
196 = note: this usage of core::panic!() is deprecated; it will be a hard error in Rust 2021
197 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
198 help: add a "{}" format string to Display the message
200 LL | core::panic!("{}", &*"abc");
203 warning: panic message is not a string literal
204 --> $DIR/non-fmt-panic.rs:32:12
206 LL | panic!(Some(123));
209 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
210 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
211 help: add a "{:?}" format string to use the Debug implementation of `Option<i32>`
213 LL | panic!("{:?}", Some(123));
215 help: or use std::panic::panic_any instead
217 LL | std::panic::panic_any(Some(123));
218 | ~~~~~~~~~~~~~~~~~~~~~
220 warning: panic message contains an unused formatting placeholder
221 --> $DIR/non-fmt-panic.rs:33:12
223 LL | panic!(concat!("{", "}"));
226 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
227 help: add the missing argument
229 LL | panic!(concat!("{", "}"), ...);
231 help: or add a "{}" format string to use the message literally
233 LL | panic!("{}", concat!("{", "}"));
236 warning: panic message contains braces
237 --> $DIR/non-fmt-panic.rs:34:5
239 LL | panic!(concat!("{", "{"));
240 | ^^^^^^^^^^^^^^^^^^^^^^^^^
242 = note: this message is not used as a format string, but will be in Rust 2021
243 help: add a "{}" format string to use the message literally
245 LL | panic!("{}", concat!("{", "{"));
248 warning: panic message contains an unused formatting placeholder
249 --> $DIR/non-fmt-panic.rs:36:37
251 LL | fancy_panic::fancy_panic!("test {} 123");
254 = note: this message is not used as a format string when given without arguments, but will be in Rust 2021
256 warning: panic message is not a string literal
257 --> $DIR/non-fmt-panic.rs:46:12
262 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
263 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
264 help: add a "{}" format string to Display the message
266 LL | panic!("{}", a!());
268 help: or use std::panic::panic_any instead
270 LL | std::panic::panic_any(a!());
271 | ~~~~~~~~~~~~~~~~~~~~~
273 warning: panic message is not a string literal
274 --> $DIR/non-fmt-panic.rs:47:18
276 LL | unreachable!(a!());
279 = note: this usage of unreachable!() is deprecated; it will be a hard error in Rust 2021
280 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
281 help: add a "{}" format string to Display the message
283 LL | unreachable!("{}", a!());
286 warning: panic message is not a string literal
287 --> $DIR/non-fmt-panic.rs:49:12
289 LL | panic!(format!("{}", 1));
292 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
293 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
294 = note: the panic!() macro supports formatting, so there's no need for the format!() macro here
295 help: remove the `format!(..)` macro call
297 LL - panic!(format!("{}", 1));
298 LL + panic!("{}", 1);
301 warning: panic message is not a string literal
302 --> $DIR/non-fmt-panic.rs:50:18
304 LL | unreachable!(format!("{}", 1));
307 = note: this usage of unreachable!() is deprecated; it will be a hard error in Rust 2021
308 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
309 = note: the unreachable!() macro supports formatting, so there's no need for the format!() macro here
310 help: remove the `format!(..)` macro call
312 LL - unreachable!(format!("{}", 1));
313 LL + unreachable!("{}", 1);
316 warning: panic message is not a string literal
317 --> $DIR/non-fmt-panic.rs:51:20
319 LL | assert!(false, format!("{}", 1));
322 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
323 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
324 = note: the assert!() macro supports formatting, so there's no need for the format!() macro here
325 help: remove the `format!(..)` macro call
327 LL - assert!(false, format!("{}", 1));
328 LL + assert!(false, "{}", 1);
331 warning: panic message is not a string literal
332 --> $DIR/non-fmt-panic.rs:52:26
334 LL | debug_assert!(false, format!("{}", 1));
337 = note: this usage of debug_assert!() is deprecated; it will be a hard error in Rust 2021
338 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
339 = note: the debug_assert!() macro supports formatting, so there's no need for the format!() macro here
340 help: remove the `format!(..)` macro call
342 LL - debug_assert!(false, format!("{}", 1));
343 LL + debug_assert!(false, "{}", 1);
346 warning: panic message is not a string literal
347 --> $DIR/non-fmt-panic.rs:54:12
352 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
353 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
354 help: add a "{}" format string to Display the message
356 LL | panic!["{}", 123];
358 help: or use std::panic::panic_any instead
360 LL | std::panic::panic_any(123);
361 | ~~~~~~~~~~~~~~~~~~~~~~ ~
363 warning: panic message is not a string literal
364 --> $DIR/non-fmt-panic.rs:55:12
369 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
370 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
371 help: add a "{}" format string to Display the message
373 LL | panic!{"{}", 123};
375 help: or use std::panic::panic_any instead
377 LL | std::panic::panic_any(123);
378 | ~~~~~~~~~~~~~~~~~~~~~~ ~
380 warning: panic message is not a string literal
381 --> $DIR/non-fmt-panic.rs:72:12
386 | help: use std::panic::panic_any instead: `std::panic::panic_any`
388 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
389 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
391 warning: panic message is not a string literal
392 --> $DIR/non-fmt-panic.rs:73:20
394 LL | assert!(false, v);
397 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
398 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
400 warning: panic message is not a string literal
401 --> $DIR/non-fmt-panic.rs:77:12
406 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
407 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
408 help: add a "{:?}" format string to use the Debug implementation of `T`
410 LL | panic!("{:?}", v);
412 help: or use std::panic::panic_any instead
414 LL | std::panic::panic_any(v);
415 | ~~~~~~~~~~~~~~~~~~~~~
417 warning: panic message is not a string literal
418 --> $DIR/non-fmt-panic.rs:78:20
420 LL | assert!(false, v);
423 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
424 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
425 help: add a "{:?}" format string to use the Debug implementation of `T`
427 LL | assert!(false, "{:?}", v);
430 warning: panic message is not a string literal
431 --> $DIR/non-fmt-panic.rs:82:12
436 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
437 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
438 help: add a "{}" format string to Display the message
440 LL | panic!("{}", v);
442 help: or use std::panic::panic_any instead
444 LL | std::panic::panic_any(v);
445 | ~~~~~~~~~~~~~~~~~~~~~
447 warning: panic message is not a string literal
448 --> $DIR/non-fmt-panic.rs:83:20
450 LL | assert!(false, v);
453 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
454 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
455 help: add a "{}" format string to Display the message
457 LL | assert!(false, "{}", v);
460 warning: panic message is not a string literal
461 --> $DIR/non-fmt-panic.rs:87:12
466 = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
467 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
468 help: add a "{}" format string to Display the message
470 LL | panic!("{}", v);
472 help: or use std::panic::panic_any instead
474 LL | std::panic::panic_any(v);
475 | ~~~~~~~~~~~~~~~~~~~~~
477 warning: panic message is not a string literal
478 --> $DIR/non-fmt-panic.rs:88:20
480 LL | assert!(false, v);
483 = note: this usage of assert!() is deprecated; it will be a hard error in Rust 2021
484 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
485 help: add a "{}" format string to Display the message
487 LL | assert!(false, "{}", v);
490 warning: 35 warnings emitted