File tree 2 files changed +3
-4
lines changed
tests/ui/consts/miri_unleashed
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
// compile-flags: -Zunleash-the-miri-inside-of-you
2
- #![ feature( core_intrinsics) ]
3
2
4
3
// During CTFE, we prevent pointer-to-int casts.
5
4
// Pointer comparisons are prevented in the trait system.
Original file line number Diff line number Diff line change 1
1
error[E0080]: could not evaluate static initializer
2
- --> $DIR/ptr_arith.rs:8 :13
2
+ --> $DIR/ptr_arith.rs:7 :13
3
3
|
4
4
LL | let x = &0 as *const _ as usize;
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^ exposing pointers is not possible at compile-time
6
6
7
7
error[E0080]: could not evaluate static initializer
8
- --> $DIR/ptr_arith.rs:16 :14
8
+ --> $DIR/ptr_arith.rs:15 :14
9
9
|
10
10
LL | let _v = x + 0;
11
11
| ^ unable to turn pointer into integer
@@ -16,7 +16,7 @@ LL | let _v = x + 0;
16
16
warning: skipping const checks
17
17
|
18
18
help: skipping check that does not even have a feature gate
19
- --> $DIR/ptr_arith.rs:8 :13
19
+ --> $DIR/ptr_arith.rs:7 :13
20
20
|
21
21
LL | let x = &0 as *const _ as usize;
22
22
| ^^^^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments