Skip to content

Commit 0d00764

Browse files
committed
PR feedback
1 parent 8a95c85 commit 0d00764

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#![feature(core_intrinsics)]
2+
fn main() {
3+
// one bit in common
4+
unsafe { std::intrinsics::disjoint_bitor(0b01101001_u8, 0b10001110) }; //~ ERROR: Undefined Behavior
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error: Undefined Behavior: `assume` called with `false`
2+
--> tests/fail/intrinsics/disjoint_bitor.rs:LL:CC
3+
|
4+
LL | unsafe { std::intrinsics::disjoint_bitor(0b01101001_u8, 0b10001110) };
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `assume` called with `false`
6+
|
7+
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
8+
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
9+
= note: BACKTRACE:
10+
= note: inside `main` at tests/fail/intrinsics/disjoint_bitor.rs:LL:CC
11+
12+
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
13+
14+
error: aborting due to 1 previous error
15+

0 commit comments

Comments
 (0)