We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48918fa commit 3d43543Copy full SHA for 3d43543
src/libsyntax/codemap.rs
@@ -308,7 +308,7 @@ impl CodeMap {
308
pub fn mk_substr_filename(&self, sp: Span) -> ~str {
309
let pos = self.lookup_char_pos(sp.lo);
310
return format!("<{}:{}:{}>", pos.file.name,
311
- pos.line, pos.col.to_uint());
+ pos.line, pos.col.to_uint() + 1)
312
}
313
314
/// Lookup source information about a BytePos
@@ -354,7 +354,7 @@ impl CodeMap {
354
let lo = self.lookup_char_pos_adj(sp.lo);
355
let hi = self.lookup_char_pos_adj(sp.hi);
356
return format!("{}:{}:{}: {}:{}", lo.filename,
357
- 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)
358
359
360
pub fn span_to_filename(&self, sp: Span) -> FileName {
0 commit comments