From 5b5b2581e45f824ddc84d36762f2153dc4567f92 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 12 Jul 2018 08:32:39 -0700 Subject: [PATCH] Try to fix example's compile on nightly --- examples/intrinsics.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/intrinsics.rs b/examples/intrinsics.rs index ddcb1ab..6468a83 100644 --- a/examples/intrinsics.rs +++ b/examples/intrinsics.rs @@ -14,6 +14,7 @@ #![feature(start)] #![feature(global_allocator)] #![feature(allocator_api)] +#![feature(panic_implementation)] #![cfg_attr(windows, feature(panic_unwind))] #![no_std] @@ -442,7 +443,7 @@ pub fn _Unwind_Resume() {} #[no_mangle] pub extern "C" fn eh_personality() {} -#[lang = "panic_fmt"] -#[no_mangle] -#[allow(private_no_mangle_fns)] -extern "C" fn panic_fmt() {} +#[panic_implementation] +fn panic(x: &core::panic::PanicInfo) -> ! { + loop {} +}