rust/src/test/run-pass/borrowck-move-from-unsafe-ptr-ok.rs
Niko Matsakis 60603703ea handle moves in let initializers and allow moves from unsafe ptrs
Related to issue #2657, but this is not a complete fix.
2012-06-21 08:34:54 -07:00

11 lines
132 B
Rust

// just make sure this compiles:
fn bar(x: *~int) -> ~int {
unsafe {
let y <- *x;
ret y;
}
}
fn main() {
}