blob: 57e95ef19dc9975a962b809b77269ecc8eb89fe1 (
plain)
1
2
3
4
5
6
7
|
// This should fail even without validation.
//@compile-flags: -Zmiri-disable-validation -Zmiri-permissive-provenance
fn main() {
let x = 16usize as *const u32;
let _y = unsafe { &*x as *const u32 }; //~ ERROR: is a dangling pointer
}
|