Skip to content

Commit 31c9339

Browse files
committed
Use format string in bootstrap panic instead of a string directly
This fixes the following warning when compiling with nightly: ``` warning: panic message is not a string literal --> src/bootstrap/builder.rs:1515:24 | 1515 | panic!(out); | ^^^ | = note: `#[warn(non_fmt_panic)]` on by default = note: this is no longer accepted in Rust 2021 help: add a "{}" format string to Display the message | 1515 | panic!("{}", out); | ^^^^^ help: or use std::panic::panic_any instead | 1515 | std::panic::panic_any(out); | ^^^^^^^^^^^^^^^^^^^^^^ ```
1 parent 9a1d617 commit 31c9339

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@ impl<'a> Builder<'a> {
14901490
for el in stack.iter().rev() {
14911491
out += &format!("\t{:?}\n", el);
14921492
}
1493-
panic!(out);
1493+
panic!("{}", out);
14941494
}
14951495
if let Some(out) = self.cache.get(&step) {
14961496
self.verbose(&format!("{}c {:?}", " ".repeat(stack.len()), step));

0 commit comments

Comments
 (0)