@@ -26,7 +26,7 @@ use crate::ty::{
26
26
use rustc_ast as ast;
27
27
use rustc_data_structures:: fingerprint:: Fingerprint ;
28
28
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
29
- use rustc_data_structures:: intern:: { InTy , Interned } ;
29
+ use rustc_data_structures:: intern:: { Interned , WithStableHash } ;
30
30
use rustc_data_structures:: memmap:: Mmap ;
31
31
use rustc_data_structures:: profiling:: SelfProfilerRef ;
32
32
use rustc_data_structures:: sharded:: { IntoPointer , ShardedHashMap } ;
@@ -105,7 +105,7 @@ pub struct CtxtInterners<'tcx> {
105
105
106
106
// Specifically use a speedy hash algorithm for these hash sets, since
107
107
// they're accessed quite often.
108
- type_ : InternedSet < ' tcx , InTy < TyS < ' tcx > > > ,
108
+ type_ : InternedSet < ' tcx , WithStableHash < TyS < ' tcx > > > ,
109
109
substs : InternedSet < ' tcx , InternalSubsts < ' tcx > > ,
110
110
canonical_var_infos : InternedSet < ' tcx , List < CanonicalVarInfo < ' tcx > > > ,
111
111
region : InternedSet < ' tcx , RegionKind > ,
@@ -180,7 +180,9 @@ impl<'tcx> CtxtInterners<'tcx> {
180
180
outer_exclusive_binder : flags. outer_exclusive_binder ,
181
181
} ;
182
182
183
- InternedInSet ( self . arena . alloc ( InTy { internee : ty_struct, stable_hash } ) )
183
+ InternedInSet (
184
+ self . arena . alloc ( WithStableHash { internee : ty_struct, stable_hash } ) ,
185
+ )
184
186
} )
185
187
. 0 ,
186
188
) )
@@ -2047,23 +2049,23 @@ impl<'tcx, T: 'tcx + ?Sized> IntoPointer for InternedInSet<'tcx, T> {
2047
2049
}
2048
2050
2049
2051
#[ 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 > > > {
2051
2053
fn borrow < ' a > ( & ' a self ) -> & ' a TyKind < ' tcx > {
2052
2054
& self . 0 . kind
2053
2055
}
2054
2056
}
2055
2057
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 {
2058
2060
// The `Borrow` trait requires that `x.borrow() == y.borrow()` equals
2059
2061
// `x == y`.
2060
2062
self . 0 . kind == other. 0 . kind
2061
2063
}
2062
2064
}
2063
2065
2064
- impl < ' tcx > Eq for InternedInSet < ' tcx , InTy < TyS < ' tcx > > > { }
2066
+ impl < ' tcx > Eq for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > { }
2065
2067
2066
- impl < ' tcx > Hash for InternedInSet < ' tcx , InTy < TyS < ' tcx > > > {
2068
+ impl < ' tcx > Hash for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > {
2067
2069
fn hash < H : Hasher > ( & self , s : & mut H ) {
2068
2070
// The `Borrow` trait requires that `x.borrow().hash(s) == x.hash(s)`.
2069
2071
self . 0 . kind . hash ( s)
0 commit comments