This commit is contained in:
Ralf Jung 2022-03-24 10:06:33 -04:00
parent 16c69fd290
commit 3275df31ea
3 changed files with 3 additions and 3 deletions

View file

@ -1 +1 @@
9bd53718e2537d95d8c092609618c2dcd6f05127
d2df372bca13bb60979c909660e69f2451630e81

View file

@ -1,5 +1,5 @@
#[allow(deref_nullptr)]
fn main() {
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR null pointer is not a valid pointer for this operation
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR null pointer is not a valid pointer
panic!("this should never print: {}", x);
}

View file

@ -1,4 +1,4 @@
#[allow(deref_nullptr)]
fn main() {
unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR null pointer is not a valid pointer for this operation
unsafe { *std::ptr::null_mut() = 0i32 }; //~ ERROR null pointer is not a valid pointer
}