Use the default panicking alloc error handler

This commit is contained in:
bjorn3
2023-10-03 14:26:32 +02:00
committed by Jeremy Soller
parent 6b1c154847
commit c99e582c86
2 changed files with 0 additions and 9 deletions
-1
View File
@@ -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)]
-8
View File
@@ -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");
}