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

7 lines
148 B
Rust

fn foo(x: *~int) -> ~int {
let y <- *x; //~ ERROR dereference of unsafe pointer requires unsafe function or block
return y;
}
fn main() {
}