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