rust/src/test/compile-fail/issue-1965.rs

8 lines
182 B
Rust
Raw Normal View History

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