Bläddra i källkod

Try to fix example's compile on nightly

Alex Crichton 6 år sedan
förälder
incheckning
5b5b2581e4
1 ändrade filer med 5 tillägg och 4 borttagningar
  1. 5 4
      examples/intrinsics.rs

+ 5 - 4
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 {}
+}