rustup
This commit is contained in:
parent
16c69fd290
commit
3275df31ea
3 changed files with 3 additions and 3 deletions
|
|
@ -1 +1 @@
|
|||
9bd53718e2537d95d8c092609618c2dcd6f05127
|
||||
d2df372bca13bb60979c909660e69f2451630e81
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue