2019-07-27 11:03:12 +02:00
|
|
|
// This should fail even without validation.
|
2022-06-26 21:26:14 -04:00
|
|
|
// compile-flags: -Zmiri-disable-validation -Zmiri-permissive-provenance
|
2019-07-27 11:03:12 +02:00
|
|
|
|
|
|
|
fn main() {
|
2020-04-11 09:30:13 +02:00
|
|
|
let x = 16usize as *const u32;
|
2022-03-17 13:49:10 +00:00
|
|
|
let _y = unsafe { &*x as *const u32 }; //~ ERROR is not a valid pointer
|
2019-07-27 11:03:12 +02:00
|
|
|
}
|