Use the default panicking alloc error handler
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
// Ensure that all must_use results are used
|
||||
#![deny(unused_must_use)]
|
||||
|
||||
#![feature(alloc_error_handler)]
|
||||
#![feature(allocator_api)]
|
||||
#![feature(asm_const)] // TODO: Relax requirements of most asm invocations
|
||||
#![feature(const_option)]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//! Intrinsics for panic handling
|
||||
|
||||
use core::alloc::Layout;
|
||||
use core::panic::PanicInfo;
|
||||
|
||||
use crate::{cpu_id, context, interrupt, syscall};
|
||||
@@ -33,10 +32,3 @@ pub extern "C" fn rust_begin_unwind(info: &PanicInfo) -> ! {
|
||||
unsafe { interrupt::halt(); }
|
||||
}
|
||||
}
|
||||
|
||||
#[alloc_error_handler]
|
||||
#[no_mangle]
|
||||
#[allow(improper_ctypes_definitions)] // Layout is not repr(C)
|
||||
pub extern fn rust_oom(_layout: Layout) -> ! {
|
||||
panic!("kernel memory allocation failed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user