about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-17 10:00:11 +0000
committerbors <bors@rust-lang.org>2022-06-17 10:00:11 +0000
commit3a8b0144c82197a70e919ad371d56f82c2282833 (patch)
treeeb71135beb73c3b9e597c2de8f5aff8e35939eae /compiler/rustc_query_impl/src
parentecdd374e6123d79b89c3ecea618d827c931b81cd (diff)
parentae5959f4bab2d48e909cc5af6b906526ab83cc3d (diff)
downloadrust-3a8b0144c82197a70e919ad371d56f82c2282833.tar.gz
rust-3a8b0144c82197a70e919ad371d56f82c2282833.zip
Auto merge of #98106 - cjgillot:split-definitions, r=michaelwoerister
Split up `Definitions` and `ResolverAstLowering`.

Split off https://github.com/rust-lang/rust/pull/95573

r? `@michaelwoerister`
Diffstat (limited to 'compiler/rustc_query_impl/src')
-rw-r--r--compiler/rustc_query_impl/src/on_disk_cache.rs5
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 0fb1d728293..b01c512a3b4 100644
--- a/compiler/rustc_query_impl/src/on_disk_cache.rs
+++ b/compiler/rustc_query_impl/src/on_disk_cache.rs
@@ -690,8 +690,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),
@@ -869,7 +868,7 @@ impl<'a, 'tcx> Encodable<CacheEncoder<'a, 'tcx>> for Span {
         }
 
         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);