remove lookup_char_pos_adj
It is now exactly equivalent to lookup_char_pos.
This commit is contained in:
parent
20dbf28624
commit
63080b3c25
5 changed files with 9 additions and 30 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue