From 4eb0c0787acea41a7079582563f4d2c8ca0cc33a Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sat, 26 Jan 2019 15:14:39 +0100 Subject: [PATCH] Print a message when panicking from mini_core --- example/mini_core.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/example/mini_core.rs b/example/mini_core.rs index 8b21d62ea54..ebd35f7bdcd 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -268,6 +268,7 @@ pub trait FnMut: FnOnce { #[lang = "panic"] pub fn panic(&(_msg, _file, _line, _col): &(&'static str, &'static str, u32, u32)) -> ! { unsafe { + libc::puts("Panicking\0" as *const str as *const u8); intrinsics::abort(); } }