1
Fork 0
rust/src/test/run-pass/liveness-move-in-loop.rs

16 lines
223 B
Rust
Raw Normal View History

fn take(-x: int) -> int {x}
fn the_loop() {
let mut list = ~[];
loop {
let x = 5;
if x > 3 {
2012-09-18 22:45:24 -07:00
list += ~[take(move x)];
} else {
break;
}
}
}
fn main() {}