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

6 lines
126 B
Rust
Raw Normal View History

2012-03-05 18:27:27 -06:00
// error-pattern:variable 'x' captured more than once
fn main() {
let x = 5;
let y = fn~[copy x, x]() -> int { x };
}