summary refs log tree commit diff
path: root/src/test/compile-fail/issue-1965.rs
blob: 9742acba1e3185593fa40dd894aa0ad6f3ff7b39 (plain)
1
2
3
4
5
6
7
// error-pattern:moving out of captured outer immutable variable in a stack closure
fn test(-x: uint) {}

fn main() {
    let i = 3u;
    for uint::range(0u, 10u) |_x| {test(i)}
}