rust/src/test/compile-fail/cap-clause-double-move.rs
2012-05-07 13:22:42 -07:00

6 lines
129 B
Rust

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