rust/src/test/compile-fail/borrowck-unary-move.rs
2012-08-02 22:36:36 -07:00

11 lines
215 B
Rust

fn foo(+x: ~int) -> int {
let y = &*x; //~ NOTE loan of argument granted here
free(move x); //~ ERROR moving out of argument prohibited due to outstanding loan
*y
}
fn free(+_x: ~int) {
}
fn main() {
}