From 10089455287dcc3652b984ab4bfd6971e1b5f302 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 3 Aug 2013 12:45:23 -0400 Subject: remove obsolete `foreach` keyword this has been replaced by `for` --- src/libsyntax/codemap.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libsyntax/codemap.rs') diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 04b9fdce666..0da424ce54c 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -363,7 +363,7 @@ impl CodeMap { let lo = self.lookup_char_pos(sp.lo); let hi = self.lookup_char_pos(sp.hi); let mut lines = ~[]; - foreach i in range(lo.line - 1u, hi.line as uint) { + for i in range(lo.line - 1u, hi.line as uint) { lines.push(i); }; return @FileLines {file: lo.file, lines: lines}; @@ -378,7 +378,7 @@ impl CodeMap { } pub fn get_filemap(&self, filename: &str) -> @FileMap { - foreach fm in self.files.iter() { if filename == fm.name { return *fm; } } + for fm in self.files.iter() { if filename == fm.name { return *fm; } } //XXjdm the following triggers a mismatched type bug // (or expected function, found _|_) fail!(); // ("asking for " + filename + " which we don't know about"); @@ -464,7 +464,7 @@ impl CodeMap { // The number of extra bytes due to multibyte chars in the FileMap let mut total_extra_bytes = 0; - foreach mbc in map.multibyte_chars.iter() { + for mbc in map.multibyte_chars.iter() { debug!("codemap: %?-byte char at %?", mbc.bytes, mbc.pos); if mbc.pos < bpos { total_extra_bytes += mbc.bytes; -- cgit 1.4.1-3-g733a5