Skip to content

Commit

Permalink
Ues the new alloc_error_handler attribute
Browse files Browse the repository at this point in the history
It is in the queue for stabilization
  • Loading branch information
GabrielMajeri committed Jul 12, 2018
1 parent feec7a3 commit 06b5d06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uefi-services/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#![feature(lang_items)]
#![feature(panic_implementation)]
#![feature(panic_info_message)]
#![feature(alloc_error_handler)]

// These crates are required.
extern crate rlibc;
Expand Down Expand Up @@ -109,7 +110,7 @@ fn panic_fmt(info: &core::panic::PanicInfo) -> ! {
}
}

#[lang = "oom"]
#[alloc_error_handler]
fn out_of_memory(_: ::core::alloc::Layout) -> ! {
// TODO: handle out-of-memory conditions
loop { }
Expand Down

0 comments on commit 06b5d06

Please sign in to comment.