File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ feature( intrinsics) ]
2
+
3
+ extern "rust-intrinsic" {
4
+ fn raw_eq < T > ( a : & T , b : & T ) -> bool ;
5
+ }
6
+
7
+ fn main ( ) {
8
+ let x = & 0 ;
9
+ // FIXME: the error message is not great (should be UB rather than 'unsupported')
10
+ unsafe { raw_eq ( & x, & x) } ; //~ERROR: unsupported operation
11
+ }
Original file line number Diff line number Diff line change
1
+ error: unsupported operation: unable to turn pointer into raw bytes
2
+ --> $DIR/raw_eq_on_ptr.rs:LL:CC
3
+ |
4
+ LL | unsafe { raw_eq(&x, &x) };
5
+ | ^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
6
+ |
7
+ = help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
8
+ = note: backtrace:
9
+ = note: inside `main` at $DIR/raw_eq_on_ptr.rs:LL:CC
10
+
11
+ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
12
+
13
+ error: aborting due to previous error
14
+
You can’t perform that action at this time.
0 commit comments