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