rust/src/test/compile-fail/cap-clause-double-move.rs

6 lines
126 B
Rust

// error-pattern:Variable 'x' captured more than once
fn main() {
let x = 5;
let y = fn~[move x, x]() -> int { x };
}