Add some more tracing
This commit is contained in:
parent
38e576423d
commit
4281380717
5 changed files with 13 additions and 3 deletions
|
@ -474,11 +474,12 @@ impl SourceMap {
|
|||
f.lookup_line(sp.lo()) != f.lookup_line(sp.hi())
|
||||
}
|
||||
|
||||
#[instrument(skip(self), level = "trace")]
|
||||
pub fn is_valid_span(&self, sp: Span) -> Result<(Loc, Loc), SpanLinesError> {
|
||||
let lo = self.lookup_char_pos(sp.lo());
|
||||
debug!("span_to_lines: lo={:?}", lo);
|
||||
trace!(?lo);
|
||||
let hi = self.lookup_char_pos(sp.hi());
|
||||
debug!("span_to_lines: hi={:?}", hi);
|
||||
trace!(?hi);
|
||||
if lo.file.start_pos != hi.file.start_pos {
|
||||
return Err(SpanLinesError::DistinctSources(DistinctSources {
|
||||
begin: (lo.file.name.clone(), lo.file.start_pos),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue