]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | #![crate_type = "bin"] |
94b46f34 | 2 | #![feature(lang_items)] |
b7449926 | 3 | #![feature(const_panic)] |
94b46f34 | 4 | #![no_main] |
b7449926 | 5 | #![no_std] |
9e0c209e | 6 | |
94b46f34 XL |
7 | use core::panic::PanicInfo; |
8 | ||
b7449926 | 9 | const Z: () = panic!("cheese"); |
a1dfa0c6 | 10 | //~^ ERROR any use of this value will cause an error |
b7449926 XL |
11 | |
12 | const Y: () = unreachable!(); | |
a1dfa0c6 | 13 | //~^ ERROR any use of this value will cause an error |
b7449926 XL |
14 | |
15 | const X: () = unimplemented!(); | |
a1dfa0c6 | 16 | //~^ ERROR any use of this value will cause an error |
83c7162d | 17 | |
94b46f34 XL |
18 | #[lang = "eh_personality"] |
19 | fn eh() {} | |
1b1a35ee XL |
20 | #[lang = "eh_catch_typeinfo"] |
21 | static EH_CATCH_TYPEINFO: u8 = 0; | |
b7449926 XL |
22 | |
23 | #[panic_handler] | |
24 | fn panic(_info: &PanicInfo) -> ! { | |
25 | loop {} | |
26 | } |