2019-07-27 04:03:12 -05:00
|
|
|
// This should fail even without validation.
|
|
|
|
// compile-flags: -Zmiri-disable-validation
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = 2usize as *const u32;
|
2020-03-08 17:34:54 -05:00
|
|
|
let _y = unsafe { &*x as *const u32 }; //~ ERROR invalid use of 2 as a pointer
|
2019-07-27 04:03:12 -05:00
|
|
|
}
|