rust/src/test/run-pass/issue-3211.rs
Patrick Walton f571e46ddb test: Remove non-procedure uses of do from compiletest, libstd tests,
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-26 08:25:27 -08:00

7 lines
116 B
Rust

pub fn main() {
let mut x = 0;
4096.times(|| x += 1);
assert_eq!(x, 4096);
println!("x = {}", x);
}