rustc: Fix for-range loops that can use iterators
Transform range loops that can be regular iterator loops.
This commit is contained in:
parent
e7d4a9c7f2
commit
8523f6d643
9 changed files with 21 additions and 29 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue