]> git.proxmox.com Git - rustc.git/blame - src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs
New upstream version 1.38.0+dfsg1
[rustc.git] / src / test / ui / feature-gates / feature-gate-alloc-error-handler.rs
CommitLineData
8faf50e0 1// compile-flags:-C panic=abort
94b46f34 2
8faf50e0
XL
3#![no_std]
4#![no_main]
94b46f34 5
8faf50e0 6use core::alloc::Layout;
94b46f34 7
416331ca 8#[alloc_error_handler] //~ ERROR `#[alloc_error_handler]` is an unstable feature
8faf50e0
XL
9fn oom(info: Layout) -> ! {
10 loop {}
94b46f34 11}
0731742a
XL
12
13#[panic_handler]
14fn panic(_: &core::panic::PanicInfo) -> ! { loop {} }