Print panic message

This commit is contained in:
Philipp Oppermann
2015-10-08 18:31:16 +02:00
parent abd6e48c08
commit f59b6c03d6

View File

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