2021-04-15 03:00:39 -05:00
|
|
|
#[allow(deref_nullptr)]
|
2016-06-13 07:27:05 -05:00
|
|
|
fn main() {
|
2021-05-08 02:33:27 -05:00
|
|
|
let x: i32 = unsafe { *std::ptr::null() }; //~ ERROR null pointer is not a valid pointer for this operation
|
2016-06-13 07:27:05 -05:00
|
|
|
panic!("this should never print: {}", x);
|
|
|
|
}
|