rust-osdev / bootloader

An experimental pure-Rust x86 bootloader
Apache License 2.0
1.31k stars 204 forks source link

panic message is not a string literal #137

Closed sebastianv89 closed 3 years ago

sebastianv89 commented 3 years ago

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:

https://github.com/rust-osdev/bootloader/blob/6a8a2635b400868d0fa057b74df0d1949a37ee3c/build.rs#L128

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 commented 3 years ago

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