about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorWilco Kusee <wilcokusee@gmail.com>2021-01-31 10:32:34 +0100
committerMichael Goulet <michael@errs.io>2022-05-28 11:38:22 -0700
commita7015fe8169ebfcd6707f34bf190cb4c4ae302f7 (patch)
treee443b532f373659632e8005baccce82eef3f5e91 /compiler/rustc_query_impl/src
parent4f39fb1f34d4bd25d9ce96afe7b2d109f073e286 (diff)
downloadrust-a7015fe8169ebfcd6707f34bf190cb4c4ae302f7.tar.gz
rust-a7015fe8169ebfcd6707f34bf190cb4c4ae302f7.zip
Move things to rustc_type_ir
Diffstat (limited to 'compiler/rustc_query_impl/src')
-rw-r--r--compiler/rustc_query_impl/src/on_disk_cache.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/rustc_query_impl/src/on_disk_cache.rs b/compiler/rustc_query_impl/src/on_disk_cache.rs
index c4920408527..5282c317fc4 100644
--- a/compiler/rustc_query_impl/src/on_disk_cache.rs
+++ b/compiler/rustc_query_impl/src/on_disk_cache.rs
@@ -547,12 +547,13 @@ where
     value
 }
 
-impl<'a, 'tcx> TyDecoder<'tcx> for CacheDecoder<'a, 'tcx> {
+impl<'a, 'tcx> TyDecoder for CacheDecoder<'a, 'tcx> {
+    type I = TyInterner<'tcx>;
     const CLEAR_CROSS_CRATE: bool = false;
 
     #[inline]
-    fn tcx(&self) -> TyCtxt<'tcx> {
-        self.tcx
+    fn interner(&self) -> TyInterner<'tcx> {
+        TyInterner { tcx: self.tcx }
     }
 
     #[inline]
@@ -569,7 +570,7 @@ impl<'a, 'tcx> TyDecoder<'tcx> for CacheDecoder<'a, 'tcx> {
     where
         F: FnOnce(&mut Self) -> Ty<'tcx>,
     {
-        let tcx = self.tcx();
+        let tcx = self.tcx;
 
         let cache_key = ty::CReaderCacheKey { cnum: None, pos: shorthand };
 
@@ -750,7 +751,7 @@ impl<'a, 'tcx> Decodable<CacheDecoder<'a, 'tcx>> for DefId {
         // If we get to this point, then all of the query inputs were green,
         // which means that the definition with this hash is guaranteed to
         // still exist in the current compilation session.
-        d.tcx().def_path_hash_to_def_id(def_path_hash, &mut || {
+        d.tcx.def_path_hash_to_def_id(def_path_hash, &mut || {
             panic!("Failed to convert DefPathHash {:?}", def_path_hash)
         })
     }
@@ -927,10 +928,11 @@ where
     }
 }
 
-impl<'a, 'tcx, E> TyEncoder<'tcx> for CacheEncoder<'a, 'tcx, E>
+impl<'a, 'tcx, E> TyEncoder for CacheEncoder<'a, 'tcx, E>
 where
     E: 'a + OpaqueEncoder,
 {
+    type I = TyInterner<'tcx>;
     const CLEAR_CROSS_CRATE: bool = false;
 
     fn position(&self) -> usize {