rust/src/test/compile-fail/issue-1965.rs
2012-10-12 20:43:37 -07:00

8 lines
182 B
Rust

// error-pattern:moving out of captured outer immutable variable in a stack closure
fn test(-x: uint) {}
fn main() {
let i = 3;
for uint::range(0, 10) |_x| {test(move i)}
}