diff options
| author | Jan Niklas Hasse <jhasse@gmail.com> | 2013-12-28 23:23:44 +0100 |
|---|---|---|
| committer | Jan Niklas Hasse <jhasse@gmail.com> | 2014-01-02 02:07:21 +0100 |
| commit | 3d43543c2104d6592e2a0e879d75cf27208be0c5 (patch) | |
| tree | c29cae3f18dc33e088152d808646d01d27c5bd30 /src/libsyntax | |
| parent | 48918fab7226593a4ad406cd83edb46e5c15dd15 (diff) | |
| download | rust-3d43543c2104d6592e2a0e879d75cf27208be0c5.tar.gz rust-3d43543c2104d6592e2a0e879d75cf27208be0c5.zip | |
Output columns 1-based. Fixes #10848
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 { |
