This commit is contained in:
Oli Scherer 2022-09-07 13:26:35 +00:00
parent b8a97c4b97
commit f9ff70cef9
3 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
dec689432fac6720b2f18101ac28a21add98b1b8
e7c7aa7288559f8e5ea7ce3543ff946b09783628

View File

@ -5,6 +5,6 @@ fn main() {
unsafe {
std::intrinsics::assume(x < 10);
std::intrinsics::assume(x > 1);
std::intrinsics::assume(x > 42); //~ ERROR: `assume` intrinsic called with `false`
std::intrinsics::assume(x > 42); //~ ERROR: `assume` called with `false`
}
}

View File

@ -1,8 +1,8 @@
error: Undefined Behavior: `assume` intrinsic called with `false`
error: Undefined Behavior: `assume` called with `false`
--> $DIR/assume.rs:LL:CC
|
LL | std::intrinsics::assume(x > 42);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `assume` intrinsic called with `false`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `assume` called with `false`
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information