Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: panic message is not a string literal #305

Closed
XuJiandong opened this issue Feb 20, 2022 · 1 comment
Closed

warning: panic message is not a string literal #305

XuJiandong opened this issue Feb 20, 2022 · 1 comment

Comments

@XuJiandong
Copy link

XuJiandong commented Feb 20, 2022

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
Copy link
Contributor

neithernut commented Feb 20, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants