diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-06-30 16:19:07 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-07-01 19:19:32 -0700 |
| commit | d1fc2b5995fdef69fe1dbdbba3703398c0aa547b (patch) | |
| tree | b6d14fd0e920512a29c64a671cc2a5bb90132abb /src/libsyntax/codemap.rs | |
| parent | 13a8f545388929a07af110a950441e6a1b88473a (diff) | |
| download | rust-d1fc2b5995fdef69fe1dbdbba3703398c0aa547b.tar.gz rust-d1fc2b5995fdef69fe1dbdbba3703398c0aa547b.zip | |
Convert to new closure syntax
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 7bbf8f1ed07..4c30016fdc8 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -185,7 +185,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 mut lines = ~[]; - for uint::range(lo.line - 1u, hi.line as uint) {|i| + for uint::range(lo.line - 1u, hi.line as uint) |i| { vec::push(lines, i); }; ret @{file: lo.file, lines: lines}; @@ -224,7 +224,7 @@ fn get_snippet(cm: codemap::codemap, fidx: uint, lo: uint, hi: uint) -> str } fn get_filemap(cm: codemap, filename: str) -> filemap { - for cm.files.each {|fm| if fm.name == filename { ret fm; } } + for cm.files.each |fm| { if fm.name == filename { ret fm; } } //XXjdm the following triggers a mismatched type bug // (or expected function, found _|_) fail; // ("asking for " + filename + " which we don't know about"); |
