blob: aaf4550d295055c0a056fee006bd5325ae9e21a1 [file]
#[repr(C)]
struct S {
a: (),
b: i8,
}
fn main() {
let mut x = &S { a: (), b: 0 };
unsafe { (&raw mut x).cast::<usize>().write(16) };
let _val = x as *const _; //~ERROR: must be dereferenceable for 1 byte, but got 0x10[noalloc] which is a dangling pointer
}