@@ -80,8 +80,8 @@ use crate::ty::{
80
80
self , AdtDef , AdtDefData , AdtKind , Binder , Clause , Clauses , Const , GenericArg , GenericArgs ,
81
81
GenericArgsRef , GenericParamDefKind , List , ListWithCachedTypeInfo , ParamConst , ParamTy ,
82
82
Pattern , PatternKind , PolyExistentialPredicate , PolyFnSig , Predicate , PredicateKind ,
83
- PredicatePolarity , Region , RegionKind , ReprOptions , TraitObjectVisitor , Ty , TyKind , TyVid ,
84
- ValTree , ValTreeKind , Visibility ,
83
+ PredicatePolarity , Region , RegionKind , ReprOptions , SigBinderRef , TraitObjectVisitor , Ty ,
84
+ TyBinderRef , TyKind , TyVid , ValTree , ValTreeKind , Visibility ,
85
85
} ;
86
86
87
87
#[ allow( rustc:: usage_of_ty_tykind) ]
@@ -97,6 +97,9 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
97
97
type Term = ty:: Term < ' tcx > ;
98
98
type BoundVarKinds = & ' tcx List < ty:: BoundVariableKind > ;
99
99
100
+ type SigBinderRef = ty:: SigBinderRef < ' tcx > ;
101
+ type TyBinderRef = ty:: TyBinderRef < ' tcx > ;
102
+
100
103
type BoundVarKind = ty:: BoundVariableKind ;
101
104
type PredefinedOpaques = solve:: PredefinedOpaques < ' tcx > ;
102
105
@@ -813,6 +816,8 @@ pub struct CtxtInterners<'tcx> {
813
816
captures : InternedSet < ' tcx , List < & ' tcx ty:: CapturedPlace < ' tcx > > > ,
814
817
offset_of : InternedSet < ' tcx , List < ( VariantIdx , FieldIdx ) > > ,
815
818
valtree : InternedSet < ' tcx , ty:: ValTreeKind < ' tcx > > ,
819
+ ty_binder : InternedSet < ' tcx , ty:: Binder < ' tcx , Ty < ' tcx > > > ,
820
+ sig_binder : InternedSet < ' tcx , ty:: Binder < ' tcx , ty:: FnSigTys < ' tcx > > > ,
816
821
}
817
822
818
823
impl < ' tcx > CtxtInterners < ' tcx > {
@@ -849,6 +854,8 @@ impl<'tcx> CtxtInterners<'tcx> {
849
854
captures : InternedSet :: with_capacity ( N ) ,
850
855
offset_of : InternedSet :: with_capacity ( N ) ,
851
856
valtree : InternedSet :: with_capacity ( N ) ,
857
+ ty_binder : InternedSet :: with_capacity ( N ) ,
858
+ sig_binder : InternedSet :: with_capacity ( N ) ,
852
859
}
853
860
}
854
861
@@ -2331,6 +2338,8 @@ nop_lift! { predicate; Predicate<'a> => Predicate<'tcx> }
2331
2338
nop_lift ! { predicate; Clause <' a> => Clause <' tcx> }
2332
2339
nop_lift ! { layout; Layout <' a> => Layout <' tcx> }
2333
2340
nop_lift ! { valtree; ValTree <' a> => ValTree <' tcx> }
2341
+ nop_lift ! { ty_binder; TyBinderRef <' a> => TyBinderRef <' tcx> }
2342
+ nop_lift ! { sig_binder; SigBinderRef <' a> => SigBinderRef <' tcx> }
2334
2343
2335
2344
nop_list_lift ! { type_lists; Ty <' a> => Ty <' tcx> }
2336
2345
nop_list_lift ! {
@@ -2595,6 +2604,8 @@ direct_interners! {
2595
2604
ExternalConstraints -> ExternalConstraints <' tcx>,
2596
2605
predefined_opaques_in_body: pub mk_predefined_opaques_in_body( PredefinedOpaquesData <TyCtxt <' tcx>>) :
2597
2606
PredefinedOpaques -> PredefinedOpaques <' tcx>,
2607
+ ty_binder: pub mk_ty_binder( ty:: Binder <' tcx, Ty <' tcx>>) : TyBinderRef -> TyBinderRef <' tcx>,
2608
+ sig_binder: pub mk_sig_binder( ty:: Binder <' tcx, ty:: FnSigTys <' tcx>>) : SigBinderRef -> SigBinderRef <' tcx>,
2598
2609
}
2599
2610
2600
2611
macro_rules! slice_interners {
0 commit comments