rust/tests/ui/missing/missing-allocator.rs
2023-04-25 00:08:35 +02:00

19 lines
301 B
Rust

// 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 {}
}
#[alloc_error_handler]
fn oom(_: core::alloc::Layout) -> ! {
loop {}
}
extern crate alloc;