From f5e0b760d0ef062447f4f5b35adef5c75c8c69ff Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Mon, 26 Sep 2022 16:04:58 +0100 Subject: Stabilize default_alloc_error_handler Closes #66741 --- src/test/ui/missing/missing-alloc_error_handler.rs | 23 ---------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/test/ui/missing/missing-alloc_error_handler.rs (limited to 'src/test/ui/missing/missing-alloc_error_handler.rs') diff --git a/src/test/ui/missing/missing-alloc_error_handler.rs b/src/test/ui/missing/missing-alloc_error_handler.rs deleted file mode 100644 index 4d378f010ed..00000000000 --- a/src/test/ui/missing/missing-alloc_error_handler.rs +++ /dev/null @@ -1,23 +0,0 @@ -// compile-flags: -C panic=abort -// no-prefer-dynamic - -#![no_std] -#![crate_type = "staticlib"] -#![feature(alloc_error_handler)] - -#[panic_handler] -fn panic(_: &core::panic::PanicInfo) -> ! { - loop {} -} - -extern crate alloc; - -#[global_allocator] -static A: MyAlloc = MyAlloc; - -struct MyAlloc; - -unsafe impl core::alloc::GlobalAlloc for MyAlloc { - unsafe fn alloc(&self, _: core::alloc::Layout) -> *mut u8 { 0 as _ } - unsafe fn dealloc(&self, _: *mut u8, _: core::alloc::Layout) {} -} -- cgit 1.4.1-3-g733a5