BurntSushi / quickcheck

Automated property based testing for Rust (with shrinking).
The Unlicense
2.32k stars 144 forks source link

warning: panic message is not a string literal #305

Closed XuJiandong closed 2 years ago

XuJiandong commented 2 years ago

While compling with Rust `1.56.1', it reports:

warning: panic message is not a string literal
   --> src/tester.rs:165:35
    |
165 |             Err(result) => panic!(result.failed_msg()),
    |                                   ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(non_fmt_panics)]` on by default
    = note: this usage of panic!() is deprecated; it will be a hard error in Rust 2021
    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html>
help: add a "{}" format string to Display the message
    |
165 |             Err(result) => panic!("{}", result.failed_msg()),
    |                                   +++++
neithernut commented 2 years ago

There are multiple PRs (#284 and #299) fixing this, already.