@@ -26,7 +26,7 @@ use crate::ty::{
2626use rustc_ast as ast;
2727use rustc_data_structures:: fingerprint:: Fingerprint ;
2828use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
29- use rustc_data_structures:: intern:: { InTy , Interned } ;
29+ use rustc_data_structures:: intern:: { Interned , WithStableHash } ;
3030use rustc_data_structures:: memmap:: Mmap ;
3131use rustc_data_structures:: profiling:: SelfProfilerRef ;
3232use rustc_data_structures:: sharded:: { IntoPointer , ShardedHashMap } ;
@@ -105,7 +105,7 @@ pub struct CtxtInterners<'tcx> {
105105
106106 // Specifically use a speedy hash algorithm for these hash sets, since
107107 // they're accessed quite often.
108- type_ : InternedSet < ' tcx , InTy < TyS < ' tcx > > > ,
108+ type_ : InternedSet < ' tcx , WithStableHash < TyS < ' tcx > > > ,
109109 substs : InternedSet < ' tcx , InternalSubsts < ' tcx > > ,
110110 canonical_var_infos : InternedSet < ' tcx , List < CanonicalVarInfo < ' tcx > > > ,
111111 region : InternedSet < ' tcx , RegionKind > ,
@@ -180,7 +180,9 @@ impl<'tcx> CtxtInterners<'tcx> {
180180 outer_exclusive_binder : flags. outer_exclusive_binder ,
181181 } ;
182182
183- InternedInSet ( self . arena . alloc ( InTy { internee : ty_struct, stable_hash } ) )
183+ InternedInSet (
184+ self . arena . alloc ( WithStableHash { internee : ty_struct, stable_hash } ) ,
185+ )
184186 } )
185187 . 0 ,
186188 ) )
@@ -2047,23 +2049,23 @@ impl<'tcx, T: 'tcx + ?Sized> IntoPointer for InternedInSet<'tcx, T> {
20472049}
20482050
20492051#[ allow( rustc:: usage_of_ty_tykind) ]
2050- impl < ' tcx > Borrow < TyKind < ' tcx > > for InternedInSet < ' tcx , InTy < TyS < ' tcx > > > {
2052+ impl < ' tcx > Borrow < TyKind < ' tcx > > for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > {
20512053 fn borrow < ' a > ( & ' a self ) -> & ' a TyKind < ' tcx > {
20522054 & self . 0 . kind
20532055 }
20542056}
20552057
2056- impl < ' tcx > PartialEq for InternedInSet < ' tcx , InTy < TyS < ' tcx > > > {
2057- fn eq ( & self , other : & InternedInSet < ' tcx , InTy < TyS < ' tcx > > > ) -> bool {
2058+ impl < ' tcx > PartialEq for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > {
2059+ fn eq ( & self , other : & InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > ) -> bool {
20582060 // The `Borrow` trait requires that `x.borrow() == y.borrow()` equals
20592061 // `x == y`.
20602062 self . 0 . kind == other. 0 . kind
20612063 }
20622064}
20632065
2064- impl < ' tcx > Eq for InternedInSet < ' tcx , InTy < TyS < ' tcx > > > { }
2066+ impl < ' tcx > Eq for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > { }
20652067
2066- impl < ' tcx > Hash for InternedInSet < ' tcx , InTy < TyS < ' tcx > > > {
2068+ impl < ' tcx > Hash for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > {
20672069 fn hash < H : Hasher > ( & self , s : & mut H ) {
20682070 // The `Borrow` trait requires that `x.borrow().hash(s) == x.hash(s)`.
20692071 self . 0 . kind . hash ( s)
0 commit comments