about summary refs log tree commit diff
path: root/tests/ui/consts/is_val_statically_known.rs
blob: d55910d32d3328e496ba8320fb01a8183c9536b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ run-pass

#![feature(core_intrinsics)]

use std::intrinsics::is_val_statically_known;

const CONST_TEST: bool = is_val_statically_known(0);

fn main() {
    if CONST_TEST {
        unreachable!("currently expected to return false during const eval");
        // but note that this is not a guarantee!
    }
}