rust/src/test/compile-fail/unsafe-fn-deref-ptr.rs
2012-08-01 19:16:06 -07:00

9 lines
144 B
Rust

// -*- rust -*-
fn f(p: *u8) -> u8 {
return *p; //~ ERROR dereference of unsafe pointer requires unsafe function or block
}
fn main() {
}