Use relative positions inside a SourceFile.
This commit is contained in:
parent
9c25fbfa06
commit
96e583fd52
@ -268,7 +268,7 @@ impl ParseSess {
|
|||||||
let source_file = self.parse_sess.source_map().lookup_char_pos(span.lo()).file;
|
let source_file = self.parse_sess.source_map().lookup_char_pos(span.lo()).file;
|
||||||
SnippetProvider::new(
|
SnippetProvider::new(
|
||||||
source_file.start_pos,
|
source_file.start_pos,
|
||||||
source_file.end_pos,
|
source_file.end_position(),
|
||||||
Lrc::clone(source_file.src.as_ref().unwrap()),
|
Lrc::clone(source_file.src.as_ref().unwrap()),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user