@@ -27,7 +27,7 @@ use crate::ty::{GenericArg, GenericArgKind, InternalSubsts, SubstsRef, UserSubst
27
27
use rustc_ast as ast;
28
28
use rustc_data_structures:: fingerprint:: Fingerprint ;
29
29
use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
30
- use rustc_data_structures:: intern:: { Interned , WithStableHash } ;
30
+ use rustc_data_structures:: intern:: { Interned , WithCachedTypeInfo } ;
31
31
use rustc_data_structures:: memmap:: Mmap ;
32
32
use rustc_data_structures:: profiling:: SelfProfilerRef ;
33
33
use rustc_data_structures:: sharded:: { IntoPointer , ShardedHashMap } ;
@@ -136,13 +136,13 @@ pub struct CtxtInterners<'tcx> {
136
136
137
137
// Specifically use a speedy hash algorithm for these hash sets, since
138
138
// they're accessed quite often.
139
- type_ : InternedSet < ' tcx , WithStableHash < TyS < ' tcx > > > ,
139
+ type_ : InternedSet < ' tcx , WithCachedTypeInfo < TyS < ' tcx > > > ,
140
140
const_lists : InternedSet < ' tcx , List < ty:: Const < ' tcx > > > ,
141
141
substs : InternedSet < ' tcx , InternalSubsts < ' tcx > > ,
142
142
canonical_var_infos : InternedSet < ' tcx , List < CanonicalVarInfo < ' tcx > > > ,
143
143
region : InternedSet < ' tcx , RegionKind < ' tcx > > ,
144
144
poly_existential_predicates : InternedSet < ' tcx , List < PolyExistentialPredicate < ' tcx > > > ,
145
- predicate : InternedSet < ' tcx , WithStableHash < PredicateS < ' tcx > > > ,
145
+ predicate : InternedSet < ' tcx , WithCachedTypeInfo < PredicateS < ' tcx > > > ,
146
146
predicates : InternedSet < ' tcx , List < Predicate < ' tcx > > > ,
147
147
projs : InternedSet < ' tcx , List < ProjectionKind > > ,
148
148
place_elems : InternedSet < ' tcx , List < PlaceElem < ' tcx > > > ,
@@ -200,7 +200,7 @@ impl<'tcx> CtxtInterners<'tcx> {
200
200
} ;
201
201
202
202
InternedInSet (
203
- self . arena . alloc ( WithStableHash { internee : ty_struct, stable_hash } ) ,
203
+ self . arena . alloc ( WithCachedTypeInfo { internee : ty_struct, stable_hash } ) ,
204
204
)
205
205
} )
206
206
. 0 ,
@@ -253,7 +253,7 @@ impl<'tcx> CtxtInterners<'tcx> {
253
253
254
254
InternedInSet (
255
255
self . arena
256
- . alloc ( WithStableHash { internee : predicate_struct, stable_hash } ) ,
256
+ . alloc ( WithCachedTypeInfo { internee : predicate_struct, stable_hash } ) ,
257
257
)
258
258
} )
259
259
. 0 ,
@@ -2167,48 +2167,48 @@ impl<'tcx, T: 'tcx + ?Sized> IntoPointer for InternedInSet<'tcx, T> {
2167
2167
}
2168
2168
2169
2169
#[ 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 > > > {
2171
2171
fn borrow < ' a > ( & ' a self ) -> & ' a TyKind < ' tcx > {
2172
2172
& self . 0 . kind
2173
2173
}
2174
2174
}
2175
2175
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 {
2178
2178
// The `Borrow` trait requires that `x.borrow() == y.borrow()` equals
2179
2179
// `x == y`.
2180
2180
self . 0 . kind == other. 0 . kind
2181
2181
}
2182
2182
}
2183
2183
2184
- impl < ' tcx > Eq for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > { }
2184
+ impl < ' tcx > Eq for InternedInSet < ' tcx , WithCachedTypeInfo < TyS < ' tcx > > > { }
2185
2185
2186
- impl < ' tcx > Hash for InternedInSet < ' tcx , WithStableHash < TyS < ' tcx > > > {
2186
+ impl < ' tcx > Hash for InternedInSet < ' tcx , WithCachedTypeInfo < TyS < ' tcx > > > {
2187
2187
fn hash < H : Hasher > ( & self , s : & mut H ) {
2188
2188
// The `Borrow` trait requires that `x.borrow().hash(s) == x.hash(s)`.
2189
2189
self . 0 . kind . hash ( s)
2190
2190
}
2191
2191
}
2192
2192
2193
2193
impl < ' tcx > Borrow < Binder < ' tcx , PredicateKind < ' tcx > > >
2194
- for InternedInSet < ' tcx , WithStableHash < PredicateS < ' tcx > > >
2194
+ for InternedInSet < ' tcx , WithCachedTypeInfo < PredicateS < ' tcx > > >
2195
2195
{
2196
2196
fn borrow < ' a > ( & ' a self ) -> & ' a Binder < ' tcx , PredicateKind < ' tcx > > {
2197
2197
& self . 0 . kind
2198
2198
}
2199
2199
}
2200
2200
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 {
2203
2203
// The `Borrow` trait requires that `x.borrow() == y.borrow()` equals
2204
2204
// `x == y`.
2205
2205
self . 0 . kind == other. 0 . kind
2206
2206
}
2207
2207
}
2208
2208
2209
- impl < ' tcx > Eq for InternedInSet < ' tcx , WithStableHash < PredicateS < ' tcx > > > { }
2209
+ impl < ' tcx > Eq for InternedInSet < ' tcx , WithCachedTypeInfo < PredicateS < ' tcx > > > { }
2210
2210
2211
- impl < ' tcx > Hash for InternedInSet < ' tcx , WithStableHash < PredicateS < ' tcx > > > {
2211
+ impl < ' tcx > Hash for InternedInSet < ' tcx , WithCachedTypeInfo < PredicateS < ' tcx > > > {
2212
2212
fn hash < H : Hasher > ( & self , s : & mut H ) {
2213
2213
// The `Borrow` trait requires that `x.borrow().hash(s) == x.hash(s)`.
2214
2214
self . 0 . kind . hash ( s)
0 commit comments