@@ -311,5 +311,67 @@ help: or use std::panic::panic_any instead
311311LL | std::panic::panic_any(123);
312312 | ~~~~~~~~~~~~~~~~~~~~~~ ~
313313
314- warning: 22 warnings emitted
314+ warning: panic message is not a string literal
315+ --> $DIR/non-fmt-panic.rs:67:12
316+ |
317+ LL | panic!(v);
318+ | ------ ^
319+ | |
320+ | help: use std::panic::panic_any instead: `std::panic::panic_any`
321+ |
322+ = note: this usage of panic!() 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+
325+ warning: panic message is not a string literal
326+ --> $DIR/non-fmt-panic.rs:71:12
327+ |
328+ LL | panic!(v);
329+ | ^
330+ |
331+ = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
332+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
333+ help: add a "{:?}" format string to use the Debug implementation of `T`
334+ |
335+ LL | panic!("{:?}", v);
336+ | +++++++
337+ help: or use std::panic::panic_any instead
338+ |
339+ LL | std::panic::panic_any(v);
340+ | ~~~~~~~~~~~~~~~~~~~~~
341+
342+ warning: panic message is not a string literal
343+ --> $DIR/non-fmt-panic.rs:75:12
344+ |
345+ LL | panic!(v);
346+ | ^
347+ |
348+ = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
349+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
350+ help: add a "{}" format string to Display the message
351+ |
352+ LL | panic!("{}", v);
353+ | +++++
354+ help: or use std::panic::panic_any instead
355+ |
356+ LL | std::panic::panic_any(v);
357+ | ~~~~~~~~~~~~~~~~~~~~~
358+
359+ warning: panic message is not a string literal
360+ --> $DIR/non-fmt-panic.rs:79:12
361+ |
362+ LL | panic!(v);
363+ | ^
364+ |
365+ = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
366+ = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
367+ help: add a "{}" format string to Display the message
368+ |
369+ LL | panic!("{}", v);
370+ | +++++
371+ help: or use std::panic::panic_any instead
372+ |
373+ LL | std::panic::panic_any(v);
374+ | ~~~~~~~~~~~~~~~~~~~~~
375+
376+ warning: 26 warnings emitted
315377
0 commit comments