diff options
| author | Ralf Jung <post@ralfj.de> | 2022-12-24 10:12:14 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-12-24 10:12:14 +0100 |
| commit | 9c01e9f7f56694db0179673fca221358d3524903 (patch) | |
| tree | 7a64babe493c9e88f72cfd2eead7fccadd304e0a /src/test/ui/missing/missing-alloc_error_handler.rs | |
| parent | 0c14ad4d9fe83e737d7b8db0c2520ef54c99926e (diff) | |
| parent | 4f4d0586ad20c66a16d547581ca379beafece93a (diff) | |
| download | rust-9c01e9f7f56694db0179673fca221358d3524903.tar.gz rust-9c01e9f7f56694db0179673fca221358d3524903.zip | |
Merge from rustc
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) {} -} |
