diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-08-03 12:45:23 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-08-03 22:48:02 -0400 |
| commit | 10089455287dcc3652b984ab4bfd6971e1b5f302 (patch) | |
| tree | a9570eacf4ff89a1f14b7380c080af77918589f6 /src/libsyntax/codemap.rs | |
| parent | 9f74217d80290d1cb36afcaf68a566b4b4907d27 (diff) | |
| download | rust-10089455287dcc3652b984ab4bfd6971e1b5f302.tar.gz rust-10089455287dcc3652b984ab4bfd6971e1b5f302.zip | |
remove obsolete `foreach` keyword
this has been replaced by `for`
Diffstat (limited to 'src/libsyntax/codemap.rs')
| -rw-r--r-- | src/libsyntax/codemap.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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; |
