Switch no-std panic to #[panic_implementation]
This commit is contained in:
parent
a740f76772
commit
a1280c672a
@ -6,7 +6,7 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(lang_items, start)]
|
#![feature(lang_items, start, panic_implementation)]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
extern crate libc;
|
extern crate libc;
|
||||||
@ -20,8 +20,8 @@ fn start(_argc: isize, _argv: *const *const u8) -> isize {
|
|||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn rust_eh_personality() {}
|
pub extern "C" fn rust_eh_personality() {}
|
||||||
|
|
||||||
#[lang = "panic_impl"]
|
#[panic_implementation]
|
||||||
fn panic_impl(_info: &core::panic::PanicInfo) -> ! {
|
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||||
unsafe {
|
unsafe {
|
||||||
libc::abort();
|
libc::abort();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user