Use the new panic handler feature

The "panic_fmt" lang item no longer exists; it has been replaced with
the unstable feature #[panic_handler]
This commit is contained in:
Dylan McKay 2018-11-05 20:20:24 +13:00
parent 4b451634e7
commit f94b23ed1d
2 changed files with 4 additions and 4 deletions

View File

@ -7,6 +7,7 @@
#![feature(associated_type_defaults)] #![feature(associated_type_defaults)]
#![feature(const_fn)] #![feature(const_fn)]
#![feature(lang_items)] #![feature(lang_items)]
#![feature(panic_handler)]
#![feature(unwind_attributes)] #![feature(unwind_attributes)]
#![no_core] #![no_core]

View File

@ -7,10 +7,9 @@ pub mod std {
pub unsafe extern "C" fn rust_eh_personality(_state: (), _exception_object: *mut (), _context: *mut ()) -> () { pub unsafe extern "C" fn rust_eh_personality(_state: (), _exception_object: *mut (), _context: *mut ()) -> () {
} }
#[lang = "panic_fmt"] #[panic_handler]
#[unwind] fn panic(_info: &::core::panic::PanicInfo) -> ! {
pub extern fn rust_begin_panic(_msg: (), _file: &'static str, _line: u32) -> ! { loop {}
loop { }
} }
} }