about summary refs log tree commit diff
path: root/src/test/auxiliary
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2012-04-06 20:01:43 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2012-04-06 20:38:23 +0200
commitc902eafa14803ca9fcb0b59ce852bdabca826c6f (patch)
tree2e282ea67adaca64dd813a78d94a6cd3766a5dac /src/test/auxiliary
parent9c88e5ef5a7e9c8db4ac56d53ba48c454b8b2010 (diff)
downloadrust-c902eafa14803ca9fcb0b59ce852bdabca826c6f.tar.gz
rust-c902eafa14803ca9fcb0b59ce852bdabca826c6f.zip
Convert old-style for loops to new-style
Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.

(This hack will go away soon.)

Issue #1619
Diffstat (limited to 'src/test/auxiliary')
-rw-r--r--src/test/auxiliary/cci_nested_lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/auxiliary/cci_nested_lib.rs b/src/test/auxiliary/cci_nested_lib.rs
index 9e3169119bc..9c26221960c 100644
--- a/src/test/auxiliary/cci_nested_lib.rs
+++ b/src/test/auxiliary/cci_nested_lib.rs
@@ -6,7 +6,7 @@ fn alist_add<A: copy, B: copy>(lst: alist<A,B>, k: A, v: B) {
 
 fn alist_get<A: copy, B: copy>(lst: alist<A,B>, k: A) -> B {
     let eq_fn = lst.eq_fn;
-    for pair in lst.data {
+    for lst.data.each {|pair|
         let (ki, vi) = pair; // copy req'd for alias analysis
         if eq_fn(k, ki) { ret vi; }
     }