about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorblake2-ppc <blake2-ppc>2013-08-07 20:19:15 +0200
committerCorey Richardson <corey@octayn.net>2013-08-07 22:39:57 -0400
commit8523f6d64355f53bb9453c2c9d32e835bec790ae (patch)
treed14d83c66414637209b90c14662a39db7b0b65a9 /src/compiletest
parente7d4a9c7f248a87a1aa6b5008c7229da2b69a20f (diff)
rustc: Fix for-range loops that can use iterators
Transform range loops that can be regular iterator loops.
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/runtest.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index 0d1c5c8eb43..9c176b504b2 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -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);