auto merge of #11184 : jhasse/rust/patch-col, r=huonw

This commit is contained in:
bors
2014-01-01 19:41:55 -08:00
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -308,7 +308,7 @@ pub fn new_filemap_w_substr(&self,
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 @@ pub fn span_to_str(&self, sp: Span) -> ~str {
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 {
@@ -0,0 +1 @@
# //~ ERROR 1:1: 1:2 error: expected item