diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-05-30 18:49:17 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-14 22:45:51 +0200 |
| commit | 34e4d72929c33bb126e0b1b199faab9031e0f3de (patch) | |
| tree | 69b51523d44c6b69ba565ede45279fca81027797 /compiler/rustc_query_impl/src | |
| parent | b676edd641dbd1049702e63dc027f92daa849d23 (diff) | |
| download | rust-34e4d72929c33bb126e0b1b199faab9031e0f3de.tar.gz rust-34e4d72929c33bb126e0b1b199faab9031e0f3de.zip | |
Separate `source_span` and `expn_that_defined` from `Definitions`.
Diffstat (limited to 'compiler/rustc_query_impl/src')
| -rw-r--r-- | compiler/rustc_query_impl/src/on_disk_cache.rs | 5 |
1 files changed, 2 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 c2c876f7f1a..166fd1d272d 100644 --- a/compiler/rustc_query_impl/src/on_disk_cache.rs +++ b/compiler/rustc_query_impl/src/on_disk_cache.rs @@ -689,8 +689,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_untracked(); + let enclosing = decoder.tcx.source_span_untracked(parent.unwrap()).data_untracked(); let span = Span::new( enclosing.lo + BytePos::from_u32(dlo), enclosing.lo + BytePos::from_u32(dto), @@ -887,7 +886,7 @@ where } if let Some(parent) = span_data.parent { - let enclosing = s.tcx.definitions_untracked().def_span(parent).data_untracked(); + let enclosing = s.tcx.source_span(parent).data_untracked(); if enclosing.contains(span_data) { TAG_RELATIVE_SPAN.encode(s); (span_data.lo - enclosing.lo).to_u32().encode(s); |
