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