From 7f775d481663b9638e9dc9175895ed382edcbe60 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 29 Dec 2022 16:07:41 -0500 Subject: [PATCH] uefi-services: Drop use of unstable `alloc_error_handler` feature As of 2022-12-18, we can rely on the `default_alloc_error_handler` feature which was stabilized in https://github.com/rust-lang/rust/pull/102318. The behavior of the default handler is to panic, essentially the same as our current custom one. --- uefi-services/src/lib.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/uefi-services/src/lib.rs b/uefi-services/src/lib.rs index 4ac3f3e1b..3404c7ce2 100644 --- a/uefi-services/src/lib.rs +++ b/uefi-services/src/lib.rs @@ -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)] @@ -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 - ); -}