Skip to content

Commit e53aba8

Browse files
bors[bot]jannic
andauthored
Merge #63
63: Remove alloc_error_handler r=adamgreig a=jannic With rust-lang/rust#102318 default_alloc_error_handler has been stabilized, ie. the default error handler is enabled by default. Therefore, it's no longer necessary to provide an alloc_error_handler if the desired error handling is equivalent to a panic. Co-authored-by: Jan Niehusmann <jan@gondor.com>
2 parents 4f1f0dc + 7dd8622 commit e53aba8

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

examples/global_alloc.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(alloc_error_handler)]
43

54
extern crate alloc;
65

76
use alloc::vec::Vec;
8-
use core::alloc::Layout;
97
use core::panic::PanicInfo;
108
use cortex_m_rt::entry;
119
use embedded_alloc::Heap;
@@ -29,11 +27,6 @@ fn main() -> ! {
2927
loop { /* .. */ }
3028
}
3129

32-
#[alloc_error_handler]
33-
fn oom(_: Layout) -> ! {
34-
loop {}
35-
}
36-
3730
#[panic_handler]
3831
fn panic(_: &PanicInfo) -> ! {
3932
loop {}

0 commit comments

Comments
 (0)