diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-08-01 03:16:42 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-08-01 05:34:55 -0400 |
| commit | 1fc4db2d086fd068a934c9ed2ccf25456fedc216 (patch) | |
| tree | 8e96cbc62b80bd622f78cf68b0bb29cb14ebc417 /src/libsyntax/codemap.rs | |
| parent | 5f59c46e0f5605a0cc90ebdb26b4d258a8f7b43a (diff) | |
| download | rust-1fc4db2d086fd068a934c9ed2ccf25456fedc216.tar.gz rust-1fc4db2d086fd068a934c9ed2ccf25456fedc216.zip | |
migrate many `for` loops to `foreach`
Diffstat (limited to 'src/libsyntax/codemap.rs')
| -rw-r--r-- | src/libsyntax/codemap.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index a9499881cff..d89057890f1 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -379,7 +379,7 @@ impl CodeMap { } pub fn get_filemap(&self, filename: &str) -> @FileMap { - for self.files.iter().advance |fm| { if filename == fm.name { return *fm; } } + foreach 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"); @@ -465,7 +465,7 @@ impl CodeMap { // The number of extra bytes due to multibyte chars in the FileMap let mut total_extra_bytes = 0; - for map.multibyte_chars.iter().advance |mbc| { + foreach mbc in map.multibyte_chars.iter() { debug!("codemap: %?-byte char at %?", mbc.bytes, mbc.pos); if mbc.pos < bpos { total_extra_bytes += mbc.bytes; |
