@@ -137,6 +137,7 @@ pub struct CtxtInterners<'tcx> {
137
137
// Specifically use a speedy hash algorithm for these hash sets, since
138
138
// they're accessed quite often.
139
139
type_ : InternedSet < ' tcx , WithStableHash < TyS < ' tcx > > > ,
140
+ const_lists : InternedSet < ' tcx , List < ty:: Const < ' tcx > > > ,
140
141
substs : InternedSet < ' tcx , InternalSubsts < ' tcx > > ,
141
142
canonical_var_infos : InternedSet < ' tcx , List < CanonicalVarInfo < ' tcx > > > ,
142
143
region : InternedSet < ' tcx , RegionKind < ' tcx > > ,
@@ -157,6 +158,7 @@ impl<'tcx> CtxtInterners<'tcx> {
157
158
CtxtInterners {
158
159
arena,
159
160
type_ : Default :: default ( ) ,
161
+ const_lists : Default :: default ( ) ,
160
162
substs : Default :: default ( ) ,
161
163
region : Default :: default ( ) ,
162
164
poly_existential_predicates : Default :: default ( ) ,
@@ -2261,6 +2263,7 @@ macro_rules! slice_interners {
2261
2263
}
2262
2264
2263
2265
slice_interners ! (
2266
+ const_lists: _intern_const_list( Const <' tcx>) ,
2264
2267
substs: _intern_substs( GenericArg <' tcx>) ,
2265
2268
canonical_var_infos: _intern_canonical_var_infos( CanonicalVarInfo <' tcx>) ,
2266
2269
poly_existential_predicates:
@@ -2722,7 +2725,7 @@ impl<'tcx> TyCtxt<'tcx> {
2722
2725
}
2723
2726
2724
2727
pub fn intern_const_list ( self , cs : & [ ty:: Const < ' tcx > ] ) -> & ' tcx List < ty:: Const < ' tcx > > {
2725
- if cs. is_empty ( ) { List :: empty ( ) } else { List :: from_arena ( self . arena , cs) }
2728
+ if cs. is_empty ( ) { List :: empty ( ) } else { self . _intern_const_list ( cs) }
2726
2729
}
2727
2730
2728
2731
pub fn intern_type_list ( self , ts : & [ Ty < ' tcx > ] ) -> & ' tcx List < Ty < ' tcx > > {
0 commit comments