diff options
| author | bors <bors@rust-lang.org> | 2022-12-16 21:08:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-16 21:08:45 +0000 |
| commit | bbb9cfbbc56f0116541b8c3a0f829a60bf7605e0 (patch) | |
| tree | 8dd2a45dae2f762a6c46374996ad6cc62838a86b /src/test/ui/missing/missing-alloc_error_handler.rs | |
| parent | 9c07efe84f28a44f3044237696acc295aa407ee5 (diff) | |
| parent | e66220f747e4823ca4fc771cc1c46f3fd2f6bc81 (diff) | |
| download | rust-bbb9cfbbc56f0116541b8c3a0f829a60bf7605e0.tar.gz rust-bbb9cfbbc56f0116541b8c3a0f829a60bf7605e0.zip | |
Auto merge of #102318 - Amanieu:default_alloc_error_handler, r=oli-obk
Stabilize default_alloc_error_handler Tracking issue: #66741 This turns `feature(default_alloc_error_handler)` on by default, which causes the compiler to automatically generate a default OOM handler which panics if `#[alloc_error_handler]` is not provided. The FCP completed over 2 years ago but the stabilization was blocked due to an issue with unwinding. This was fixed by #88098 so stabilization can be unblocked. Closes #66741
Diffstat (limited to 'src/test/ui/missing/missing-alloc_error_handler.rs')
| -rw-r--r-- | src/test/ui/missing/missing-alloc_error_handler.rs | 23 |
1 files changed, 0 insertions, 23 deletions
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) {} -} |
