]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs
parser will not give wrong help message for 'public'
[rust.git] / src / test / ui / feature-gates / feature-gate-alloc-error-handler.rs
1 // compile-flags:-C panic=abort
2
3 #![no_std]
4 #![no_main]
5
6 use core::alloc::Layout;
7
8 #[alloc_error_handler] //~ ERROR the `#[alloc_error_handler]` attribute is an experimental feature
9 fn oom(info: Layout) -> ! {
10     loop {}
11 }
12
13 #[panic_handler]
14 fn panic(_: &core::panic::PanicInfo) -> ! { loop {} }