mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
15 lines
338 B
Rust
15 lines
338 B
Rust
//@ run-pass
|
|
|
|
#![feature(core_intrinsics, is_val_statically_known)]
|
|
|
|
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!
|
|
}
|
|
}
|