Skip to content

Commit b3b49d9

Browse files
committed
auto merge of #11184 : jhasse/rust/patch-col, r=huonw
2 parents 6475255 + 86835c9 commit b3b49d9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/libsyntax/codemap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ impl CodeMap {
308308
pub fn mk_substr_filename(&self, sp: Span) -> ~str {
309309
let pos = self.lookup_char_pos(sp.lo);
310310
return format!("<{}:{}:{}>", pos.file.name,
311-
pos.line, pos.col.to_uint());
311+
pos.line, pos.col.to_uint() + 1)
312312
}
313313

314314
/// Lookup source information about a BytePos
@@ -354,7 +354,7 @@ impl CodeMap {
354354
let lo = self.lookup_char_pos_adj(sp.lo);
355355
let hi = self.lookup_char_pos_adj(sp.hi);
356356
return format!("{}:{}:{}: {}:{}", lo.filename,
357-
lo.line, lo.col.to_uint(), hi.line, hi.col.to_uint())
357+
lo.line, lo.col.to_uint() + 1, hi.line, hi.col.to_uint() + 1)
358358
}
359359

360360
pub fn span_to_filename(&self, sp: Span) -> FileName {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# //~ ERROR 1:1: 1:2 error: expected item

0 commit comments

Comments
 (0)