]> git.lizzy.rs Git - rust.git/blob - src/test/ui/missing/missing-allocator.rs
Rollup merge of #95376 - WaffleLapkin:drain_keep_rest, r=dtolnay
[rust.git] / src / test / ui / missing / missing-allocator.rs
1 // compile-flags: -C panic=abort
2 // no-prefer-dynamic
3
4 #![no_std]
5 #![crate_type = "staticlib"]
6 #![feature(alloc_error_handler)]
7
8 #[panic_handler]
9 fn panic(_: &core::panic::PanicInfo) -> ! {
10     loop {}
11 }
12
13 #[alloc_error_handler]
14 fn oom(_: core::alloc::Layout) -> ! {
15     loop {}
16 }
17
18 extern crate alloc;