2016-09-13 06:08:57 -05:00
|
|
|
#![feature(core_intrinsics)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = 5;
|
|
|
|
unsafe {
|
|
|
|
std::intrinsics::assume(x < 10);
|
|
|
|
std::intrinsics::assume(x > 1);
|
2018-07-15 04:21:56 -05:00
|
|
|
std::intrinsics::assume(x > 42); //~ ERROR constant evaluation error
|
2018-05-09 10:45:16 -05:00
|
|
|
//~^ NOTE `assume` argument was false
|
2016-09-13 06:08:57 -05:00
|
|
|
}
|
|
|
|
}
|