summary refs log tree commit diff
path: root/src/test/compile-fail/cap-clause-double-move.rs
blob: 498eb8255afe13fe5886c2a0a77c94abb6a2dd79 (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 };
}