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

6 lines
129 B
Rust
Raw Normal View History

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