summaryrefslogtreecommitdiffstats
path: root/tests/ui/intrinsics/const-eval-select-backtrace.rs
blob: ef1c7c4195b9160508b3fa517fb7b2f38f22d438 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![feature(core_intrinsics)]
// See issue #100696.
// run-fail
// check-run-results
// exec-env:RUST_BACKTRACE=0

#[track_caller]
fn uhoh() {
    panic!("Aaah!")
}

const fn c() {}

fn main() {
    // safety: this is unsound and just used to test
    unsafe {
        std::intrinsics::const_eval_select((), c, uhoh);
    }
}