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 29505630ea
commit 36abafab8c

View File

@@ -86,7 +86,7 @@ extern "C" fn eh_personality() {}
#[cfg(not(test))] #[cfg(not(test))]
#[lang = "panic_fmt"] #[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!("\n\nPANIC in {} at line {}:", file, line);
println!(" {}", fmt); println!(" {}", fmt);
loop {} loop {}