summary refs log tree commit diff
path: root/src/test/compile-fail/cap-clause-double-move.rs
blob: bd00726c97b37542edaa55ede34fdc5100c2aa48 (plain)
1
2
3
4
5
// error-pattern:variable 'x' captured more than once
fn main() {
    let x = 5;
    let y = fn~[move x, x]() -> int { x };
}