summary refs log tree commit diff
path: root/src/test/run-pass/liveness-move-in-loop.rs
blob: e0a05c9b2976e0417c490f9acdd793e1275bdfff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn take(-x: int) -> int {x}

fn the_loop() {
    let mut list = ~[];
    loop {
        let x = 5;
        if x > 3 {
            list += ~[take(x)];
        } else {
            break;
        }
    }
}

fn main() {}