Skip to content

Commit

Permalink
uefi-services: Drop use of unstable alloc_error_handler feature
Browse files Browse the repository at this point in the history
As of 2022-12-18, we can rely on the `default_alloc_error_handler` feature which
was stabilized in rust-lang/rust#102318. The behavior of
the default handler is to panic, essentially the same as our current custom one.
  • Loading branch information
nicholasbishop committed Mar 4, 2023
1 parent b3b518f commit 459bc1f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions uefi-services/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
//! [`exit_boot_services`]: uefi::table::SystemTable::exit_boot_services

#![no_std]
#![feature(alloc_error_handler)]
#![feature(abi_efiapi)]
#![deny(clippy::must_use_candidate)]
#![allow(stable_features)]
Expand Down Expand Up @@ -257,11 +256,3 @@ fn panic_handler(info: &core::panic::PanicInfo) -> ! {
}
}
}

#[alloc_error_handler]
fn out_of_memory(layout: ::core::alloc::Layout) -> ! {
panic!(
"Ran out of free memory while trying to allocate {:#?}",
layout
);
}

0 comments on commit 459bc1f

Please sign in to comment.