about summary refs log tree commit diff
path: root/tests/ui/missing/missing-allocator.rs
blob: 60aa9fcc898b38127cd12fa545b2c63eb7588160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//@ 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;

//~? ERROR no global memory allocator found but one is required