From 7da777f9dedef14c276252580f24f3bfa312daff 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. --- .github/workflows/msrv_toolchain.toml | 2 +- uefi-services/src/lib.rs | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/msrv_toolchain.toml b/.github/workflows/msrv_toolchain.toml index 35936f6ea..390ccf12c 100644 --- a/.github/workflows/msrv_toolchain.toml +++ b/.github/workflows/msrv_toolchain.toml @@ -1,4 +1,4 @@ [toolchain] # Oldest nightly that currently works with `cargo xtask build`. -channel = "nightly-2022-08-25" +channel = "nightly-2022-12-18" components = ["rust-src"] diff --git a/uefi-services/src/lib.rs b/uefi-services/src/lib.rs index d22dce4a7..98d9e8dca 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)] @@ -256,11 +255,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 - ); -}