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