rust/tests/compile-fail/intrinsics/assume.rs
2020-04-11 11:36:55 +02:00

11 lines
243 B
Rust

#![feature(core_intrinsics)]
fn main() {
let x = 5;
unsafe {
std::intrinsics::assume(x < 10);
std::intrinsics::assume(x > 1);
std::intrinsics::assume(x > 42); //~ `assume` intrinsic called with `false`
}
}