@@ -87,7 +87,7 @@ pub struct CtxtInterners<'tcx> {
8787 substs : InternedSet < ' tcx , InternalSubsts < ' tcx > > ,
8888 canonical_var_infos : InternedSet < ' tcx , List < CanonicalVarInfo < ' tcx > > > ,
8989 region : InternedSet < ' tcx , RegionKind > ,
90- existential_predicates : InternedSet < ' tcx , List < ExistentialPredicate < ' tcx > > > ,
90+ poly_existential_predicates : InternedSet < ' tcx , List < ty :: Binder < ExistentialPredicate < ' tcx > > > > ,
9191 predicate : InternedSet < ' tcx , PredicateInner < ' tcx > > ,
9292 predicates : InternedSet < ' tcx , List < Predicate < ' tcx > > > ,
9393 projs : InternedSet < ' tcx , List < ProjectionKind > > ,
@@ -103,7 +103,7 @@ impl<'tcx> CtxtInterners<'tcx> {
103103 type_list : Default :: default ( ) ,
104104 substs : Default :: default ( ) ,
105105 region : Default :: default ( ) ,
106- existential_predicates : Default :: default ( ) ,
106+ poly_existential_predicates : Default :: default ( ) ,
107107 canonical_var_infos : Default :: default ( ) ,
108108 predicate : Default :: default ( ) ,
109109 predicates : Default :: default ( ) ,
@@ -1623,7 +1623,7 @@ nop_lift! {const_; &'a Const<'a> => &'tcx Const<'tcx>}
16231623nop_lift ! { predicate; & ' a PredicateInner <' a> => & ' tcx PredicateInner <' tcx>}
16241624
16251625nop_list_lift ! { type_list; Ty <' a> => Ty <' tcx>}
1626- nop_list_lift ! { existential_predicates ; ExistentialPredicate <' a> => ExistentialPredicate <' tcx>}
1626+ nop_list_lift ! { poly_existential_predicates ; ty :: Binder < ExistentialPredicate <' a>> => ty :: Binder < ExistentialPredicate <' tcx> >}
16271627nop_list_lift ! { predicates; Predicate <' a> => Predicate <' tcx>}
16281628nop_list_lift ! { canonical_var_infos; CanonicalVarInfo <' a> => CanonicalVarInfo <' tcx>}
16291629nop_list_lift ! { projs; ProjectionKind => ProjectionKind }
@@ -2064,7 +2064,8 @@ slice_interners!(
20642064 type_list: _intern_type_list( Ty <' tcx>) ,
20652065 substs: _intern_substs( GenericArg <' tcx>) ,
20662066 canonical_var_infos: _intern_canonical_var_infos( CanonicalVarInfo <' tcx>) ,
2067- existential_predicates: _intern_existential_predicates( ExistentialPredicate <' tcx>) ,
2067+ poly_existential_predicates:
2068+ _intern_poly_existential_predicates( ty:: Binder <ExistentialPredicate <' tcx>>) ,
20682069 predicates: _intern_predicates( Predicate <' tcx>) ,
20692070 projs: _intern_projs( ProjectionKind ) ,
20702071 place_elems: _intern_place_elems( PlaceElem <' tcx>) ,
@@ -2295,7 +2296,7 @@ impl<'tcx> TyCtxt<'tcx> {
22952296 #[ inline]
22962297 pub fn mk_dynamic (
22972298 self ,
2298- obj : ty :: Binder < & ' tcx List < ExistentialPredicate < ' tcx > > > ,
2299+ obj : & ' tcx List < ty :: Binder < ExistentialPredicate < ' tcx > > > ,
22992300 reg : ty:: Region < ' tcx > ,
23002301 ) -> Ty < ' tcx > {
23012302 self . mk_ty ( Dynamic ( obj, reg) )
@@ -2425,13 +2426,17 @@ impl<'tcx> TyCtxt<'tcx> {
24252426 Place { local : place. local , projection : self . intern_place_elems ( & projection) }
24262427 }
24272428
2428- pub fn intern_existential_predicates (
2429+ pub fn intern_poly_existential_predicates (
24292430 self ,
2430- eps : & [ ExistentialPredicate < ' tcx > ] ,
2431- ) -> & ' tcx List < ExistentialPredicate < ' tcx > > {
2431+ eps : & [ ty :: Binder < ExistentialPredicate < ' tcx > > ] ,
2432+ ) -> & ' tcx List < ty :: Binder < ExistentialPredicate < ' tcx > > > {
24322433 assert ! ( !eps. is_empty( ) ) ;
2433- assert ! ( eps. array_windows( ) . all( |[ a, b] | a. stable_cmp( self , b) != Ordering :: Greater ) ) ;
2434- self . _intern_existential_predicates ( eps)
2434+ assert ! (
2435+ eps. array_windows( )
2436+ . all( |[ a, b] | a. skip_binder( ) . stable_cmp( self , & b. skip_binder( ) )
2437+ != Ordering :: Greater )
2438+ ) ;
2439+ self . _intern_poly_existential_predicates ( eps)
24352440 }
24362441
24372442 pub fn intern_predicates ( self , preds : & [ Predicate < ' tcx > ] ) -> & ' tcx List < Predicate < ' tcx > > {
@@ -2488,13 +2493,16 @@ impl<'tcx> TyCtxt<'tcx> {
24882493 } )
24892494 }
24902495
2491- pub fn mk_existential_predicates <
2492- I : InternAs < [ ExistentialPredicate < ' tcx > ] , & ' tcx List < ExistentialPredicate < ' tcx > > > ,
2496+ pub fn mk_poly_existential_predicates <
2497+ I : InternAs <
2498+ [ ty:: Binder < ExistentialPredicate < ' tcx > > ] ,
2499+ & ' tcx List < ty:: Binder < ExistentialPredicate < ' tcx > > > ,
2500+ > ,
24932501 > (
24942502 self ,
24952503 iter : I ,
24962504 ) -> I :: Output {
2497- iter. intern_with ( |xs| self . intern_existential_predicates ( xs) )
2505+ iter. intern_with ( |xs| self . intern_poly_existential_predicates ( xs) )
24982506 }
24992507
25002508 pub fn mk_predicates < I : InternAs < [ Predicate < ' tcx > ] , & ' tcx List < Predicate < ' tcx > > > > (
0 commit comments