rust/src/test/run-pass/unsafe-pointer-assignability.rs
2018-12-25 21:08:33 -07:00

10 lines
102 B
Rust

fn f(x: *const isize) {
unsafe {
assert_eq!(*x, 3);
}
}
pub fn main() {
f(&3);
}