summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-10-21 12:31:48 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-10-21 12:31:48 +0200
commit6bcb4a426c80a3ee19e7b32f25942a54c43e4387 (patch)
treec2ee3f9583e18bda30cc62a1a28ac387549e6b3a /src/comp/syntax
parent4ebbbe597e44dbed0da3027fbf4e564390e0daeb (diff)
downloadrust-6bcb4a426c80a3ee19e7b32f25942a54c43e4387.tar.gz
rust-6bcb4a426c80a3ee19e7b32f25942a54c43e4387.zip
Remove last uses of iterators from stdlib
Issue #1056
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/codemap.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/comp/syntax/codemap.rs b/src/comp/syntax/codemap.rs
index 33b99609341..e3a02da9e54 100644
--- a/src/comp/syntax/codemap.rs
+++ b/src/comp/syntax/codemap.rs
@@ -198,9 +198,7 @@ fn span_to_lines(sp: span, cm: codemap::codemap) -> @file_lines {
     let lo = lookup_char_pos(cm, sp.lo);
     let hi = lookup_char_pos(cm, sp.hi);
     let lines = [];
-    for each i: uint in uint::range(lo.line - 1u, hi.line as uint) {
-        lines += [i];
-    }
+    uint::range(lo.line - 1u, hi.line as uint) {|i| lines += [i]; };
     ret @{name: lo.filename, lines: lines};
 }