Skip to content

Commit 5b5b258

Browse files
committed
Try to fix example's compile on nightly
1 parent 86bf357 commit 5b5b258

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/intrinsics.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#![feature(start)]
1515
#![feature(global_allocator)]
1616
#![feature(allocator_api)]
17+
#![feature(panic_implementation)]
1718
#![cfg_attr(windows, feature(panic_unwind))]
1819
#![no_std]
1920

@@ -442,7 +443,7 @@ pub fn _Unwind_Resume() {}
442443
#[no_mangle]
443444
pub extern "C" fn eh_personality() {}
444445

445-
#[lang = "panic_fmt"]
446-
#[no_mangle]
447-
#[allow(private_no_mangle_fns)]
448-
extern "C" fn panic_fmt() {}
446+
#[panic_implementation]
447+
fn panic(x: &core::panic::PanicInfo) -> ! {
448+
loop {}
449+
}

0 commit comments

Comments
 (0)