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(const_fn)]
#![feature(lang_items)]
#![feature(panic_handler)]
#![feature(unwind_attributes)]
#![no_core]

View File

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