File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed
src/test/ui/consts/miri_unleashed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 44
55use std:: cell:: UnsafeCell ;
66
7- // this test ICEs to ensure that our mutability story is sound
7+ // this test ensures that our mutability story is sound
88
99struct Meh {
1010 x : & ' static UnsafeCell < i32 > ,
Original file line number Diff line number Diff line change 11// compile-flags: -Zunleash-the-miri-inside-of-you
22
3- #![ feature( const_raw_ptr_deref) ]
4- #![ feature( const_mut_refs) ]
53#![ allow( const_err) ]
64
75use std:: cell:: UnsafeCell ;
Original file line number Diff line number Diff line change 11error: untyped pointers are not allowed in constant
2- --> $DIR/raw_mutable_const.rs:9 :1
2+ --> $DIR/raw_mutable_const.rs:7 :1
33 |
44LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
77warning: skipping const checks
88 |
99help: skipping check that does not even have a feature gate
10- --> $DIR/raw_mutable_const.rs:9 :38
10+ --> $DIR/raw_mutable_const.rs:7 :38
1111 |
1212LL | const MUTABLE_BEHIND_RAW: *mut i32 = &UnsafeCell::new(42) as *const _ as *mut _;
1313 | ^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments