31c5cec55b
cc #3071
11 lines
215 B
Rust
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() {
|
|
} |