diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-04-27 19:24:33 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-09-10 20:18:18 +0200 |
| commit | b19ae20aada117a589ec238f97c97a98b483f97d (patch) | |
| tree | 47dde9a7f58604722b43c70c288edd2a70f8f561 /compiler/rustc_query_impl | |
| parent | e85ddeb474665f3af7c447445c273da6117e266d (diff) | |
| download | rust-b19ae20aada117a589ec238f97c97a98b483f97d.tar.gz rust-b19ae20aada117a589ec238f97c97a98b483f97d.zip | |
Track span dependency using a callback.
Diffstat (limited to 'compiler/rustc_query_impl')
| -rw-r--r-- | compiler/rustc_query_impl/src/on_disk_cache.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_query_impl/src/on_disk_cache.rs b/compiler/rustc_query_impl/src/on_disk_cache.rs index 63000a295f6..08565812278 100644 --- a/compiler/rustc_query_impl/src/on_disk_cache.rs +++ b/compiler/rustc_query_impl/src/on_disk_cache.rs @@ -840,7 +840,7 @@ impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>> for Span { let dlo = u32::decode(decoder)?; let dto = u32::decode(decoder)?; - let enclosing = decoder.tcx.definitions_untracked().def_span(parent.unwrap()).data(); + let enclosing = decoder.tcx.definitions_untracked().def_span(parent.unwrap()).decode(); let span = Span::new( enclosing.lo + BytePos::from_u32(dlo), enclosing.lo + BytePos::from_u32(dto), @@ -1022,7 +1022,7 @@ where E: 'a + OpaqueEncoder, { fn encode(&self, s: &mut CacheEncoder<'a, 'tcx, E>) -> Result<(), E::Error> { - let span_data = self.data(); + let span_data = self.decode(); span_data.ctxt.encode(s)?; span_data.parent.encode(s)?; @@ -1031,7 +1031,7 @@ where } if let Some(parent) = span_data.parent { - let enclosing = s.tcx.definitions_untracked().def_span(parent).data(); + let enclosing = s.tcx.definitions_untracked().def_span(parent).decode(); if enclosing.contains(span_data) { TAG_RELATIVE_SPAN.encode(s)?; (span_data.lo - enclosing.lo).to_u32().encode(s)?; |
