rustc: Fix for-range loops that can use iterators

Transform range loops that can be regular iterator loops.
This commit is contained in:
blake2-ppc 2013-08-07 20:19:15 +02:00 committed by Corey Richardson
parent e7d4a9c7f2
commit 8523f6d643
9 changed files with 21 additions and 29 deletions

View file

@ -412,8 +412,8 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
}
}
for i in range(0u, found_flags.len()) {
if !found_flags[i] {
for (i, &flag) in found_flags.iter().enumerate() {
if !flag {
let ee = &expected_errors[i];
fatal_ProcRes(fmt!("expected %s on line %u not found: %s",
ee.kind, ee.line, ee.msg), ProcRes);