Fix panic_fmt arguments: file is a &'static str

(cherry picked from commit e9735738f7)
This commit is contained in:
Philipp Oppermann
2016-11-26 12:15:34 +01:00
parent 041aa2bfe6
commit d0bb3f847a

View File

@@ -85,7 +85,7 @@ extern "C" fn eh_personality() {}
#[cfg(not(test))]
#[lang = "panic_fmt"]
extern "C" fn panic_fmt(fmt: core::fmt::Arguments, file: &str, line: u32) -> ! {
extern "C" fn panic_fmt(fmt: core::fmt::Arguments, file: &'static str, line: u32) -> ! {
println!("\n\nPANIC in {} at line {}:", file, line);
println!(" {}", fmt);
loop {}