summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/unwind-abort.rs
blob: 2b0e58166c2547b65c8a1a233ede479c499b58b5 (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() {
    let _ = foo();
}