summary refs log tree commit diff
path: root/src/test/run-pass/loop-scope.rs
blob: 9dc53e726d6ad0748b8904271be9ee5a3a1eae8e (plain)
1
2
3
4
5
6
fn main() {
    let x = ~[10, 20, 30];
    let mut sum = 0;
    for x.each |x| { sum += x; }
    assert (sum == 60);
}