@@ -27,7 +27,7 @@ use crate::ty::{GenericArg, GenericArgKind, InternalSubsts, SubstsRef, UserSubst
2727use rustc_ast as ast;
2828use rustc_data_structures:: fingerprint:: Fingerprint ;
2929use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
30- use rustc_data_structures:: intern:: { Interned , WithStableHash } ;
30+ use rustc_data_structures:: intern:: { Interned , WithCachedTypeInfo } ;
3131use rustc_data_structures:: memmap:: Mmap ;
3232use rustc_data_structures:: profiling:: SelfProfilerRef ;
3333use rustc_data_structures:: sharded:: { IntoPointer , ShardedHashMap } ;
@@ -136,13 +136,13 @@ pub struct CtxtInterners<'tcx> {
136136
137137 // Specifically use a speedy hash algorithm for these hash sets, since
138138 // they're accessed quite often.
139- type_ : InternedSet < ' tcx , WithStableHash < TyS < ' tcx > > > ,
139+ type_ : InternedSet < ' tcx , WithCachedTypeInfo < TyS < ' tcx > > > ,
140140 const_lists : InternedSet < ' tcx , List < ty:: Const < ' tcx > > > ,
141141 substs : InternedSet < ' tcx , InternalSubsts < ' tcx > > ,
142142 canonical_var_infos : InternedSet < ' tcx , List < CanonicalVarInfo < ' tcx > > > ,
143143 region : InternedSet < ' tcx , RegionKind < ' tcx > > ,
144144 poly_existential_predicates : InternedSet < ' tcx , List < PolyExistentialPredicate < ' tcx > > > ,
145- predicate : InternedSet < ' tcx , WithStableHash < PredicateS < ' tcx > > > ,
145+ predicate : InternedSet < ' tcx , WithCachedTypeInfo < PredicateS < ' tcx > > > ,
146146 predicates : InternedSet < ' tcx , List < Predicate < ' tcx > > > ,
147147 projs : InternedSet < ' tcx , List < ProjectionKind > > ,
148148 place_elems : InternedSet < ' tcx , List < PlaceElem < ' tcx > > > ,
@@ -200,7 +200,7 @@ impl<'tcx> CtxtInterners<'tcx> {
200200 } ;
201201
202202 InternedInSet (
203- self . arena . alloc ( WithStableHash { internee : ty_struct, stable_hash } ) ,
203+ self . arena . alloc ( WithCachedTypeInfo { internee : ty_struct, stable_hash } ) ,
204204 )
205205 } )
206206 . 0 ,
@@ -253,7 +253,7 @@ impl<'tcx> CtxtInterners<'tcx> {
253253
254254 InternedInSet (
255255 self . arena
256- . alloc ( WithStableHash { internee : predicate_struct, stable_hash } ) ,
256+ . alloc ( WithCachedTypeInfo { internee : predicate_struct, stable_hash } ) ,
257257 )
258258 } )
259259 . 0 ,
@@ -2167,48 +2167,48 @@ impl<'tcx, T: 'tcx + ?Sized> IntoPointer for InternedInSet<'tcx, T> {
21672167}
21682168
21692169#[ allow( rustc:: usage_of_ty_tykind) ]
2170- impl < ' tcx > Borrow < TyKind < ' tcx > > for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > {
2170+ impl < ' tcx > Borrow < TyKind < ' tcx > > for InternedInSet < ' tcx , WithCachedTypeInfo < TyS < ' tcx > > > {
21712171 fn borrow < ' a > ( & ' a self ) -> & ' a TyKind < ' tcx > {
21722172 & self . 0 . kind
21732173 }
21742174}
21752175
2176- impl < ' tcx > PartialEq for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > {
2177- fn eq ( & self , other : & InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > ) -> bool {
2176+ impl < ' tcx > PartialEq for InternedInSet < ' tcx , WithCachedTypeInfo < TyS < ' tcx > > > {
2177+ fn eq ( & self , other : & InternedInSet < ' tcx , WithCachedTypeInfo < TyS < ' tcx > > > ) -> bool {
21782178 // The `Borrow` trait requires that `x.borrow() == y.borrow()` equals
21792179 // `x == y`.
21802180 self . 0 . kind == other. 0 . kind
21812181 }
21822182}
21832183
2184- impl < ' tcx > Eq for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > { }
2184+ impl < ' tcx > Eq for InternedInSet < ' tcx , WithCachedTypeInfo < TyS < ' tcx > > > { }
21852185
2186- impl < ' tcx > Hash for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > {
2186+ impl < ' tcx > Hash for InternedInSet < ' tcx , WithCachedTypeInfo < TyS < ' tcx > > > {
21872187 fn hash < H : Hasher > ( & self , s : & mut H ) {
21882188 // The `Borrow` trait requires that `x.borrow().hash(s) == x.hash(s)`.
21892189 self . 0 . kind . hash ( s)
21902190 }
21912191}
21922192
21932193impl < ' tcx > Borrow < Binder < ' tcx , PredicateKind < ' tcx > > >
2194- for InternedInSet < ' tcx , WithStableHash < PredicateS < ' tcx > > >
2194+ for InternedInSet < ' tcx , WithCachedTypeInfo < PredicateS < ' tcx > > >
21952195{
21962196 fn borrow < ' a > ( & ' a self ) -> & ' a Binder < ' tcx , PredicateKind < ' tcx > > {
21972197 & self . 0 . kind
21982198 }
21992199}
22002200
2201- impl < ' tcx > PartialEq for InternedInSet < ' tcx , WithStableHash < PredicateS < ' tcx > > > {
2202- fn eq ( & self , other : & InternedInSet < ' tcx , WithStableHash < PredicateS < ' tcx > > > ) -> bool {
2201+ impl < ' tcx > PartialEq for InternedInSet < ' tcx , WithCachedTypeInfo < PredicateS < ' tcx > > > {
2202+ fn eq ( & self , other : & InternedInSet < ' tcx , WithCachedTypeInfo < PredicateS < ' tcx > > > ) -> bool {
22032203 // The `Borrow` trait requires that `x.borrow() == y.borrow()` equals
22042204 // `x == y`.
22052205 self . 0 . kind == other. 0 . kind
22062206 }
22072207}
22082208
2209- impl < ' tcx > Eq for InternedInSet < ' tcx , WithStableHash < PredicateS < ' tcx > > > { }
2209+ impl < ' tcx > Eq for InternedInSet < ' tcx , WithCachedTypeInfo < PredicateS < ' tcx > > > { }
22102210
2211- impl < ' tcx > Hash for InternedInSet < ' tcx , WithStableHash < PredicateS < ' tcx > > > {
2211+ impl < ' tcx > Hash for InternedInSet < ' tcx , WithCachedTypeInfo < PredicateS < ' tcx > > > {
22122212 fn hash < H : Hasher > ( & self , s : & mut H ) {
22132213 // The `Borrow` trait requires that `x.borrow().hash(s) == x.hash(s)`.
22142214 self . 0 . kind . hash ( s)
0 commit comments