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