diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2021-09-20 15:24:47 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2021-09-20 15:24:47 +0000 |
| commit | 428138071748e81eb67bb090cb9cd3f78299442b (patch) | |
| tree | c44060a8718fddd67f8577c2d41b90848206b555 /compiler/rustc_span/src/source_map.rs | |
| parent | 38e576423dc56a006ccf0b72e106f09bdea6efc2 (diff) | |
| download | rust-428138071748e81eb67bb090cb9cd3f78299442b.tar.gz rust-428138071748e81eb67bb090cb9cd3f78299442b.zip | |
Add some more tracing
Diffstat (limited to 'compiler/rustc_span/src/source_map.rs')
| -rw-r--r-- | compiler/rustc_span/src/source_map.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/source_map.rs b/compiler/rustc_span/src/source_map.rs index 9e403eb3f67..b79f00a8a36 100644 --- a/compiler/rustc_span/src/source_map.rs +++ b/compiler/rustc_span/src/source_map.rs @@ -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), |
