From ce6b43cc9bcafe05a646b9c9275432fd236597a7 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sat, 26 Nov 2016 12:15:34 +0100 Subject: [PATCH] Fix panic_fmt arguments: file is a &'static str (cherry picked from commit e9735738f78eb2d3ed702c512f9b081e2dbe30d5) --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 17ff5525..f4ad65e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,7 +84,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 {}