rust/src/test/compile-fail/cap-clause-both-copy-and-move.rs
2012-03-05 17:05:20 -08:00

6 lines
131 B
Rust

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