remove lookup_char_pos_adj

It is now exactly equivalent to lookup_char_pos.
This commit is contained in:
Aleksey Kladov 2019-04-05 22:42:40 +03:00
parent 20dbf28624
commit 63080b3c25
5 changed files with 9 additions and 30 deletions

View file

@ -36,9 +36,9 @@ pub struct ErrorLocation {
impl ErrorLocation {
/// Creates an error location from a span.
pub fn from_span(ecx: &ExtCtxt<'_>, sp: Span) -> ErrorLocation {
let loc = ecx.source_map().lookup_char_pos_adj(sp.lo());
let loc = ecx.source_map().lookup_char_pos(sp.lo());
ErrorLocation {
filename: loc.filename,
filename: loc.file.name.clone(),
line: loc.line
}
}