]> git.lizzy.rs Git - rust.git/blob - src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.rs
Auto merge of #99028 - tmiasko:inline, r=estebank
[rust.git] / src / test / ui / alloc-error / alloc-error-handler-bad-signature-1.rs
1 // compile-flags:-C panic=abort
2
3 #![feature(alloc_error_handler)]
4 #![no_std]
5 #![no_main]
6
7 use core::alloc::Layout;
8
9 #[alloc_error_handler]
10 fn oom(
11     info: &Layout, //~ ERROR argument should be `Layout`
12 ) -> () //~ ERROR return type should be `!`
13 {
14     loop {}
15 }
16
17 #[panic_handler]
18 fn panic(_: &core::panic::PanicInfo) -> ! { loop {} }