about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/dangling_pointers/null_pointer_write.rs
blob: 61f5ef572cf3c9d125f65fdffee152bd506f7622 (plain)
1
2
3
4
#[allow(deref_nullptr)]
fn main() {
    unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR: null pointer
}