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