1 // Test for the behavior described in <https://github.com/rust-lang/rust/issues/87184>.
2 #![feature(const_mut_refs)]
4 const PARTIAL_OVERWRITE: () = {
7 let ptr: *mut _ = &mut p;
8 *(ptr as *mut u8) = 123; //~ ERROR any use of this value
9 //~| unable to overwrite parts of a pointer
10 //~| WARN previously accepted