Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Commit 68b0982

Browse files
committed
1 parent f1150b8 commit 68b0982

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#![no_std]
2-
#![feature(alloc, global_allocator, allocator_api, const_fn, lang_items)]
2+
#![feature(alloc, global_allocator, allocator_api, const_fn, lang_items, panic_implementation)]
33

44
extern crate alloc;
55
#[macro_use]
66
extern crate bitflags;
77

8+
use core::panic::PanicInfo;
9+
810
mod allocator;
911
pub mod bindings;
1012
mod c_types;
@@ -67,8 +69,8 @@ extern "C" {
6769
fn bug_helper() -> !;
6870
}
6971

70-
#[lang = "panic_fmt"]
71-
extern "C" fn panic_fmt() -> ! {
72+
#[panic_implementation]
73+
fn panic(_info: &PanicInfo) -> ! {
7274
unsafe {
7375
bug_helper();
7476
}

0 commit comments

Comments
 (0)