2018-07-06 08:49:52 -05:00
|
|
|
// compile-flags:-C panic=abort
|
|
|
|
|
2022-01-19 09:24:49 -06:00
|
|
|
#![feature(alloc_error_handler)]
|
2018-07-06 08:49:52 -05:00
|
|
|
#![no_std]
|
|
|
|
#![no_main]
|
|
|
|
|
|
|
|
struct Layout;
|
|
|
|
|
|
|
|
#[alloc_error_handler]
|
|
|
|
fn oom(
|
|
|
|
info: Layout, //~ ERROR argument should be `Layout`
|
|
|
|
) { //~ ERROR return type should be `!`
|
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
2018-08-22 17:40:32 -05:00
|
|
|
#[panic_handler]
|
2018-07-06 08:49:52 -05:00
|
|
|
fn panic(_: &core::panic::PanicInfo) -> ! { loop {} }
|