diff --git a/examples/mini_core.rs b/examples/mini_core.rs index 2eb2e950256..7b4eccb5713 100644 --- a/examples/mini_core.rs +++ b/examples/mini_core.rs @@ -168,7 +168,9 @@ pub trait FnMut: FnOnce { #[lang = "panic"] pub fn panic(_expr_file_line_col: &(&'static str, &'static str, u32, u32)) -> ! { - loop {} + unsafe { + intrinsics::abort(); + } } #[lang = "eh_personality"] @@ -186,6 +188,7 @@ pub unsafe fn drop_in_place(to_drop: *mut T) { pub mod intrinsics { extern "rust-intrinsic" { + pub fn abort() -> !; pub fn size_of() -> usize; pub fn copy(src: *const T, dst: *mut T, count: usize); pub fn transmute(e: T) -> U;