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

panic message is not a string literal #137

Closed
sebastianv89 opened this issue Feb 23, 2021 · 1 comment · Fixed by #138
Closed

panic message is not a string literal #137

sebastianv89 opened this issue Feb 23, 2021 · 1 comment · Fixed by #138

Comments

@sebastianv89
Copy link

sebastianv89 commented Feb 23, 2021

Running the OS tutorial (https://os.phil-opp.com/), I get a warning every time I run the OS. I traced back the issue to this line:

format!("KERNEL does not exist: {}", kernel.display())

This is the warning:

warning: panic message is not a string literal
   --> build.rs:128:9
    |
128 |         format!("KERNEL does not exist: {}", kernel.display())
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(non_fmt_panic)]` on by default
    = note: this is no longer accepted in Rust 2021
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

I run the following versions:

$ cargo --version
cargo 1.52.0-nightly (bf5a5d5e5 2021-02-18)
$ rustc --version
rustc 1.52.0-nightly (9b471a3f5 2021-02-19)
$ bootimage --version
bootimage 0.10.2
@phil-opp
Copy link
Member

Thanks for reporting! Should be fixed with #138, which was released as v0.9.13.

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

Successfully merging a pull request may close this issue.

2 participants