Skip to content

Commit d794b5e

Browse files
committed
Disable alloc_error_handler feature
Remove custom alloc_error_handler in favor of default one.
1 parent f0aa052 commit d794b5e

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#![feature(new_uninit)]
1818
#![feature(specialization)]
1919
#![feature(core_intrinsics)]
20-
#![feature(alloc_error_handler)]
2120
#![feature(strict_provenance)]
2221
#![feature(is_some_and)]
2322
#![cfg_attr(target_os = "none", no_std)]

src/runtime_glue.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Minor functions that Rust really expects to be defined by the compiler,
22
//! but which we need to provide manually because we're on bare metal.
33
4-
use alloc::alloc::Layout;
54
use core::panic::PanicInfo;
65

76
use crate::arch::core_local;
@@ -15,9 +14,3 @@ fn panic(info: &PanicInfo<'_>) -> ! {
1514

1615
syscalls::shutdown(1)
1716
}
18-
19-
#[alloc_error_handler]
20-
fn rust_oom(layout: Layout) -> ! {
21-
let size = layout.size();
22-
panic!("memory allocation of {size} bytes failed")
23-
}

0 commit comments

Comments
 (0)