2016-06-13 07:27:05 -05:00
|
|
|
fn main() {
|
|
|
|
let p = 42 as *const i32;
|
2017-06-19 03:58:59 -05:00
|
|
|
let x = unsafe { *p }; //~ ERROR: a memory access tried to interpret some bytes as a pointer
|
2016-06-13 07:27:05 -05:00
|
|
|
panic!("this should never print: {}", x);
|
|
|
|
}
|