Skip to content

Commit 84f5848

Browse files
committed
Remove #[alloc_error_handler], fix nightly build
See rust-lang/rust#109507
1 parent e1666c7 commit 84f5848

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/lib.rs

-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//! be registered as the standard library’s default allocator.
77
88
#![no_std]
9-
#![feature(alloc_error_handler)]
109

1110
#[macro_use]
1211
extern crate log;
@@ -168,16 +167,6 @@ unsafe impl GlobalAlloc for GlobalAllocator {
168167
#[cfg_attr(all(target_os = "none", not(test)), global_allocator)]
169168
static GLOBAL_ALLOCATOR: GlobalAllocator = GlobalAllocator::new();
170169

171-
#[cfg(all(target_os = "none", not(test)))]
172-
#[alloc_error_handler]
173-
fn handle_alloc_error(layout: Layout) -> ! {
174-
panic!(
175-
"Heap allocation error: available_bytes = {}, request = {:?}",
176-
global_allocator().available_bytes(),
177-
layout
178-
);
179-
}
180-
181170
/// Returns the reference to the global allocator.
182171
pub fn global_allocator() -> &'static GlobalAllocator {
183172
&GLOBAL_ALLOCATOR

0 commit comments

Comments
 (0)