mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 04:56:25 +03:00
auto merge of #11184 : jhasse/rust/patch-col, r=huonw
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user