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:
parent
4b451634e7
commit
f94b23ed1d
|
@ -7,6 +7,7 @@
|
|||
#![feature(associated_type_defaults)]
|
||||
#![feature(const_fn)]
|
||||
#![feature(lang_items)]
|
||||
#![feature(panic_handler)]
|
||||
#![feature(unwind_attributes)]
|
||||
|
||||
#![no_core]
|
||||
|
|
|
@ -7,10 +7,9 @@ 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) -> ! {
|
||||
loop { }
|
||||
#[panic_handler]
|
||||
fn panic(_info: &::core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue