summary refs log tree commit diff
path: root/src/test/debuginfo
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-31 12:20:46 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-02-02 13:40:18 -0500
commitd5d7e6565a4034b93d19be1edafd20730a4276bc (patch)
treef978751c20a214c9fe0cd2d60645a4e1a3b760fd /src/test/debuginfo
parent9f90d666e0cd9a73ef35b76b6605f9d1f69df849 (diff)
downloadrust-d5d7e6565a4034b93d19be1edafd20730a4276bc.tar.gz
rust-d5d7e6565a4034b93d19be1edafd20730a4276bc.zip
`for x in xs.iter()` -> `for x in &xs`
Diffstat (limited to 'src/test/debuginfo')
-rw-r--r--src/test/debuginfo/destructured-for-loop-variable.rs4
-rw-r--r--src/test/debuginfo/lexical-scope-in-for-loop.rs2
-rw-r--r--src/test/debuginfo/unreachable-locals.rs10
3 files changed, 8 insertions, 8 deletions
diff --git a/src/test/debuginfo/destructured-for-loop-variable.rs b/src/test/debuginfo/destructured-for-loop-variable.rs
index 08062ce8966..163771a2362 100644
--- a/src/test/debuginfo/destructured-for-loop-variable.rs
+++ b/src/test/debuginfo/destructured-for-loop-variable.rs
@@ -170,14 +170,14 @@ fn main() {
         z: true
     };
 
-    for &Struct { x, y, z } in [s].iter() {
+    for &Struct { x, y, z } in &[s] {
         zzz(); // #break
     }
 
     let tuple: (i8, u8, i16, u16, i32, u32, i64, u64, f32, f64) =
         (0x6f, 0x70, -113, 114, -115, 116, -117, 118, 119.5, 120.5);
 
-    for &(_i8, _u8, _i16, _u16, _i32, _u32, _i64, _u64, _f32, _f64) in [tuple].iter() {
+    for &(_i8, _u8, _i16, _u16, _i32, _u32, _i64, _u64, _f32, _f64) in &[tuple] {
         zzz(); // #break
     }
 
diff --git a/src/test/debuginfo/lexical-scope-in-for-loop.rs b/src/test/debuginfo/lexical-scope-in-for-loop.rs
index 1fa54e47163..fe5983cbb6a 100644
--- a/src/test/debuginfo/lexical-scope-in-for-loop.rs
+++ b/src/test/debuginfo/lexical-scope-in-for-loop.rs
@@ -94,7 +94,7 @@ fn main() {
 
     let x = 1000000; // wan meeeljen doollaars!
 
-    for &x in range.iter() {
+    for &x in &range {
         zzz(); // #break
         sentinel();
 
diff --git a/src/test/debuginfo/unreachable-locals.rs b/src/test/debuginfo/unreachable-locals.rs
index 70f8b1ccd96..8bcb54af8ba 100644
--- a/src/test/debuginfo/unreachable-locals.rs
+++ b/src/test/debuginfo/unreachable-locals.rs
@@ -26,7 +26,7 @@ fn after_return() {
     match (20i32, 'c') {
         (a, ref b) => {}
     }
-    for a in [111i32].iter() {}
+    for a in &[111i32] {}
 }
 
 fn after_panic() {
@@ -36,7 +36,7 @@ fn after_panic() {
     match (20i32, 'c') {
         (a, ref b) => {}
     }
-    for a in [111i32].iter() {}
+    for a in &[111i32] {}
 }
 
 fn after_diverging_function() {
@@ -46,7 +46,7 @@ fn after_diverging_function() {
     match (20i32, 'c') {
         (a, ref b) => {}
     }
-    for a in [111i32].iter() {}
+    for a in &[111i32] {}
 }
 
 fn after_break() {
@@ -57,7 +57,7 @@ fn after_break() {
         match (20i32, 'c') {
             (a, ref b) => {}
         }
-        for a in [111i32].iter() {}
+        for a in &[111i32] {}
     }
 }
 
@@ -69,7 +69,7 @@ fn after_continue() {
         match (20i32, 'c') {
             (a, ref b) => {}
         }
-        for a in [111i32].iter() {}
+        for a in &[111i32] {}
     }
 }