]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/unwind-abort.rs
Rollup merge of #79502 - Julian-Wollersberger:from_char_for_u64, r=withoutboats
[rust.git] / src / test / ui / consts / const-eval / unwind-abort.rs
1 #![feature(unwind_attributes, const_panic)]
2
3 #[unwind(aborts)]
4 const fn foo() {
5     panic!() //~ ERROR any use of this value will cause an error [const_err]
6 }
7
8 const _: () = foo();
9 // Ensure that the CTFE engine handles calls to `#[unwind(aborts)]` gracefully
10
11 fn main() {
12     let _ = foo();
13 }