summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/unwind-abort.rs
blob: 57959e7db6ad9de4829ba9c11fa66ffd98b07898 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(c_unwind, const_extern_fn)]

const extern "C" fn foo() {
    panic!() //~ ERROR evaluation of constant value failed
}

const _: () = foo();
// Ensure that the CTFE engine handles calls to `extern "C"` aborting gracefully

fn main() {
    foo();
}