rust/src/test/compile-fail/unsafe-fn-deref-ptr.rs

9 lines
141 B
Rust
Raw Normal View History

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