]> git.lizzy.rs Git - rust.git/blob - tests/ui/feature-gates/feature-gate-alloc-error-handler.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / 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 use of unstable library feature 'alloc_error_handler'
9 fn oom(info: Layout) -> ! {
10     loop {}
11 }
12
13 #[panic_handler]
14 fn panic(_: &core::panic::PanicInfo) -> ! {
15     loop {}
16 }