about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2022-09-26 16:04:58 +0100
committerAmanieu d'Antras <amanieu@gmail.com>2022-11-03 07:12:58 +0000
commitf5e0b760d0ef062447f4f5b35adef5c75c8c69ff (patch)
tree53296cc03a93e516be7a393a8715e14e046cfd4a /src
parentce1a7e41f96be27103b6e3ba09dcefbf5bd320bd (diff)
downloadrust-f5e0b760d0ef062447f4f5b35adef5c75c8c69ff.tar.gz
rust-f5e0b760d0ef062447f4f5b35adef5c75c8c69ff.zip
Stabilize default_alloc_error_handler
Closes #66741
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/allocator/no_std-alloc-error-handler-default.rs2
-rw-r--r--src/test/ui/missing/missing-alloc_error_handler.rs23
-rw-r--r--src/test/ui/missing/missing-alloc_error_handler.stderr6
3 files changed, 0 insertions, 31 deletions
diff --git a/src/test/ui/allocator/no_std-alloc-error-handler-default.rs b/src/test/ui/allocator/no_std-alloc-error-handler-default.rs
index 30ce0f162c7..601fda87b91 100644
--- a/src/test/ui/allocator/no_std-alloc-error-handler-default.rs
+++ b/src/test/ui/allocator/no_std-alloc-error-handler-default.rs
@@ -6,10 +6,8 @@
 // only-linux
 // compile-flags:-C panic=abort
 // aux-build:helper.rs
-// gate-test-default_alloc_error_handler
 
 #![feature(start, rustc_private, new_uninit, panic_info_message, lang_items)]
-#![feature(default_alloc_error_handler)]
 #![no_std]
 
 extern crate alloc;
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) {}
-}
diff --git a/src/test/ui/missing/missing-alloc_error_handler.stderr b/src/test/ui/missing/missing-alloc_error_handler.stderr
deleted file mode 100644
index 995fa7cf85e..00000000000
--- a/src/test/ui/missing/missing-alloc_error_handler.stderr
+++ /dev/null
@@ -1,6 +0,0 @@
-error: `#[alloc_error_handler]` function required, but not found
-
-note: use `#![feature(default_alloc_error_handler)]` for a default error handler
-
-error: aborting due to previous error
-