about summary refs log tree commit diff
path: root/compiler/rustc_query_system
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-05-27 20:03:57 -0700
committerMichael Goulet <michael@errs.io>2022-05-28 12:16:05 -0700
commit46389159403ca0973bf88a4c153a2707cdb257d2 (patch)
treee840b90c6d65e0b5f6d513eb376b46dd3c320cd4 /compiler/rustc_query_system
parentf05a92d15896604faf30d33e73c7d40b98b2ec9c (diff)
downloadrust-46389159403ca0973bf88a4c153a2707cdb257d2.tar.gz
rust-46389159403ca0973bf88a4c153a2707cdb257d2.zip
Make TyCtxt implement Interner, make HashStable generic and move to rustc_type_ir
Diffstat (limited to 'compiler/rustc_query_system')
-rw-r--r--compiler/rustc_query_system/src/ich/mod.rs122
1 files changed, 0 insertions, 122 deletions
diff --git a/compiler/rustc_query_system/src/ich/mod.rs b/compiler/rustc_query_system/src/ich/mod.rs
index ddaac1c78a1..0a1c350b2db 100644
--- a/compiler/rustc_query_system/src/ich/mod.rs
+++ b/compiler/rustc_query_system/src/ich/mod.rs
@@ -1,7 +1,6 @@
 //! ICH - Incremental Compilation Hash
 
 pub use self::hcx::StableHashingContext;
-use rustc_data_structures::stable_hasher::HashStable;
 use rustc_span::symbol::{sym, Symbol};
 
 mod hcx;
@@ -18,124 +17,3 @@ pub const IGNORED_ATTRIBUTES: &[Symbol] = &[
     sym::rustc_partition_codegened,
     sym::rustc_expected_cgu_reuse,
 ];
-
-#[allow(rustc::usage_of_ty_tykind)]
-impl<'__ctx, I: rustc_type_ir::Interner> HashStable<StableHashingContext<'__ctx>>
-    for rustc_type_ir::TyKind<I>
-where
-    I::AdtDef: HashStable<StableHashingContext<'__ctx>>,
-    I::DefId: HashStable<StableHashingContext<'__ctx>>,
-    I::SubstsRef: HashStable<StableHashingContext<'__ctx>>,
-    I::Ty: HashStable<StableHashingContext<'__ctx>>,
-    I::Const: HashStable<StableHashingContext<'__ctx>>,
-    I::TypeAndMut: HashStable<StableHashingContext<'__ctx>>,
-    I::PolyFnSig: HashStable<StableHashingContext<'__ctx>>,
-    I::ListBinderExistentialPredicate: HashStable<StableHashingContext<'__ctx>>,
-    I::Region: HashStable<StableHashingContext<'__ctx>>,
-    I::Movability: HashStable<StableHashingContext<'__ctx>>,
-    I::Mutability: HashStable<StableHashingContext<'__ctx>>,
-    I::BinderListTy: HashStable<StableHashingContext<'__ctx>>,
-    I::ListTy: HashStable<StableHashingContext<'__ctx>>,
-    I::ProjectionTy: HashStable<StableHashingContext<'__ctx>>,
-    I::BoundTy: HashStable<StableHashingContext<'__ctx>>,
-    I::ParamTy: HashStable<StableHashingContext<'__ctx>>,
-    I::PlaceholderType: HashStable<StableHashingContext<'__ctx>>,
-    I::InferTy: HashStable<StableHashingContext<'__ctx>>,
-    I::DelaySpanBugEmitted: HashStable<StableHashingContext<'__ctx>>,
-{
-    #[inline]
-    fn hash_stable(
-        &self,
-        __hcx: &mut crate::ich::StableHashingContext<'__ctx>,
-        __hasher: &mut rustc_data_structures::stable_hasher::StableHasher,
-    ) {
-        std::mem::discriminant(self).hash_stable(__hcx, __hasher);
-        use rustc_type_ir::TyKind::*;
-        match self {
-            Bool => {}
-            Char => {}
-            Int(i) => {
-                i.hash_stable(__hcx, __hasher);
-            }
-            Uint(u) => {
-                u.hash_stable(__hcx, __hasher);
-            }
-            Float(f) => {
-                f.hash_stable(__hcx, __hasher);
-            }
-            Adt(adt, substs) => {
-                adt.hash_stable(__hcx, __hasher);
-                substs.hash_stable(__hcx, __hasher);
-            }
-            Foreign(def_id) => {
-                def_id.hash_stable(__hcx, __hasher);
-            }
-            Str => {}
-            Array(t, c) => {
-                t.hash_stable(__hcx, __hasher);
-                c.hash_stable(__hcx, __hasher);
-            }
-            Slice(t) => {
-                t.hash_stable(__hcx, __hasher);
-            }
-            RawPtr(tam) => {
-                tam.hash_stable(__hcx, __hasher);
-            }
-            Ref(r, t, m) => {
-                r.hash_stable(__hcx, __hasher);
-                t.hash_stable(__hcx, __hasher);
-                m.hash_stable(__hcx, __hasher);
-            }
-            FnDef(def_id, substs) => {
-                def_id.hash_stable(__hcx, __hasher);
-                substs.hash_stable(__hcx, __hasher);
-            }
-            FnPtr(polyfnsig) => {
-                polyfnsig.hash_stable(__hcx, __hasher);
-            }
-            Dynamic(l, r) => {
-                l.hash_stable(__hcx, __hasher);
-                r.hash_stable(__hcx, __hasher);
-            }
-            Closure(def_id, substs) => {
-                def_id.hash_stable(__hcx, __hasher);
-                substs.hash_stable(__hcx, __hasher);
-            }
-            Generator(def_id, substs, m) => {
-                def_id.hash_stable(__hcx, __hasher);
-                substs.hash_stable(__hcx, __hasher);
-                m.hash_stable(__hcx, __hasher);
-            }
-            GeneratorWitness(b) => {
-                b.hash_stable(__hcx, __hasher);
-            }
-            Never => {}
-            Tuple(substs) => {
-                substs.hash_stable(__hcx, __hasher);
-            }
-            Projection(p) => {
-                p.hash_stable(__hcx, __hasher);
-            }
-            Opaque(def_id, substs) => {
-                def_id.hash_stable(__hcx, __hasher);
-                substs.hash_stable(__hcx, __hasher);
-            }
-            Param(p) => {
-                p.hash_stable(__hcx, __hasher);
-            }
-            Bound(d, b) => {
-                d.hash_stable(__hcx, __hasher);
-                b.hash_stable(__hcx, __hasher);
-            }
-            Placeholder(p) => {
-                p.hash_stable(__hcx, __hasher);
-            }
-            Infer(i) => {
-                i.hash_stable(__hcx, __hasher);
-            }
-            Error(d) => {
-                d.hash_stable(__hcx, __hasher);
-            }
-        }
-    }
-}