diff options
| author | bors <bors@rust-lang.org> | 2014-01-01 19:41:55 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-01-01 19:41:55 -0800 |
| commit | b3b49d9873afaa600ba9dc00566dba73c3eae195 (patch) | |
| tree | 225f3cd04581c233a8f6c830576a285ce6825d33 /src/libsyntax | |
| parent | 647525545b53c8ac4900a791f3b2fb2b894a4336 (diff) | |
| parent | 86835c95f4c6f4753f139b096f9949a742c0ab51 (diff) | |
| download | rust-b3b49d9873afaa600ba9dc00566dba73c3eae195.tar.gz rust-b3b49d9873afaa600ba9dc00566dba73c3eae195.zip | |
auto merge of #11184 : jhasse/rust/patch-col, r=huonw
Diffstat (limited to 'src/libsyntax')
| -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 97d3db074bb..fffcae0bde3 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -308,7 +308,7 @@ impl CodeMap { pub fn mk_substr_filename(&self, sp: Span) -> ~str { let pos = self.lookup_char_pos(sp.lo); return format!("<{}:{}:{}>", pos.file.name, - pos.line, pos.col.to_uint()); + pos.line, pos.col.to_uint() + 1) } /// Lookup source information about a BytePos @@ -354,7 +354,7 @@ impl CodeMap { let lo = self.lookup_char_pos_adj(sp.lo); let hi = self.lookup_char_pos_adj(sp.hi); return format!("{}:{}:{}: {}:{}", lo.filename, - lo.line, lo.col.to_uint(), hi.line, hi.col.to_uint()) + lo.line, lo.col.to_uint() + 1, hi.line, hi.col.to_uint() + 1) } pub fn span_to_filename(&self, sp: Span) -> FileName { |
