mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 06:28:20 +03:00
8 lines
220 B
Rust
8 lines
220 B
Rust
// This should fail even without validation.
|
|
// compile-flags: -Zmiri-disable-validation
|
|
|
|
fn main() {
|
|
let x = 16usize as *const u32;
|
|
let _y = unsafe { &*x as *const u32 }; //~ ERROR 0x10 is not a valid pointer
|
|
}
|