@@ -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 ( ) ,
@@ -1610,7 +1610,7 @@ nop_lift! {const_; &'a Const<'a> => &'tcx Const<'tcx>}
16101610nop_lift ! { predicate; & ' a PredicateInner <' a> => & ' tcx PredicateInner <' tcx>}
16111611
16121612nop_list_lift ! { type_list; Ty <' a> => Ty <' tcx>}
1613- nop_list_lift ! { existential_predicates ; ExistentialPredicate <' a> => ExistentialPredicate <' tcx>}
1613+ nop_list_lift ! { poly_existential_predicates ; ty :: Binder < ExistentialPredicate <' a>> => ty :: Binder < ExistentialPredicate <' tcx> >}
16141614nop_list_lift ! { predicates; Predicate <' a> => Predicate <' tcx>}
16151615nop_list_lift ! { canonical_var_infos; CanonicalVarInfo <' a> => CanonicalVarInfo <' tcx>}
16161616nop_list_lift ! { projs; ProjectionKind => ProjectionKind }
@@ -2051,7 +2051,8 @@ slice_interners!(
20512051 type_list: _intern_type_list( Ty <' tcx>) ,
20522052 substs: _intern_substs( GenericArg <' tcx>) ,
20532053 canonical_var_infos: _intern_canonical_var_infos( CanonicalVarInfo <' tcx>) ,
2054- existential_predicates: _intern_existential_predicates( ExistentialPredicate <' tcx>) ,
2054+ poly_existential_predicates:
2055+ _intern_poly_existential_predicates( ty:: Binder <ExistentialPredicate <' tcx>>) ,
20552056 predicates: _intern_predicates( Predicate <' tcx>) ,
20562057 projs: _intern_projs( ProjectionKind ) ,
20572058 place_elems: _intern_place_elems( PlaceElem <' tcx>) ,
@@ -2282,7 +2283,7 @@ impl<'tcx> TyCtxt<'tcx> {
22822283 #[ inline]
22832284 pub fn mk_dynamic (
22842285 self ,
2285- obj : ty :: Binder < & ' tcx List < ExistentialPredicate < ' tcx > > > ,
2286+ obj : & ' tcx List < ty :: Binder < ExistentialPredicate < ' tcx > > > ,
22862287 reg : ty:: Region < ' tcx > ,
22872288 ) -> Ty < ' tcx > {
22882289 self . mk_ty ( Dynamic ( obj, reg) )
@@ -2412,13 +2413,17 @@ impl<'tcx> TyCtxt<'tcx> {
24122413 Place { local : place. local , projection : self . intern_place_elems ( & projection) }
24132414 }
24142415
2415- pub fn intern_existential_predicates (
2416+ pub fn intern_poly_existential_predicates (
24162417 self ,
2417- eps : & [ ExistentialPredicate < ' tcx > ] ,
2418- ) -> & ' tcx List < ExistentialPredicate < ' tcx > > {
2418+ eps : & [ ty :: Binder < ExistentialPredicate < ' tcx > > ] ,
2419+ ) -> & ' tcx List < ty :: Binder < ExistentialPredicate < ' tcx > > > {
24192420 assert ! ( !eps. is_empty( ) ) ;
2420- assert ! ( eps. array_windows( ) . all( |[ a, b] | a. stable_cmp( self , b) != Ordering :: Greater ) ) ;
2421- self . _intern_existential_predicates ( eps)
2421+ assert ! (
2422+ eps. array_windows( )
2423+ . all( |[ a, b] | a. skip_binder( ) . stable_cmp( self , & b. skip_binder( ) )
2424+ != Ordering :: Greater )
2425+ ) ;
2426+ self . _intern_poly_existential_predicates ( eps)
24222427 }
24232428
24242429 pub fn intern_predicates ( self , preds : & [ Predicate < ' tcx > ] ) -> & ' tcx List < Predicate < ' tcx > > {
@@ -2475,13 +2480,16 @@ impl<'tcx> TyCtxt<'tcx> {
24752480 } )
24762481 }
24772482
2478- pub fn mk_existential_predicates <
2479- I : InternAs < [ ExistentialPredicate < ' tcx > ] , & ' tcx List < ExistentialPredicate < ' tcx > > > ,
2483+ pub fn mk_poly_existential_predicates <
2484+ I : InternAs <
2485+ [ ty:: Binder < ExistentialPredicate < ' tcx > > ] ,
2486+ & ' tcx List < ty:: Binder < ExistentialPredicate < ' tcx > > > ,
2487+ > ,
24802488 > (
24812489 self ,
24822490 iter : I ,
24832491 ) -> I :: Output {
2484- iter. intern_with ( |xs| self . intern_existential_predicates ( xs) )
2492+ iter. intern_with ( |xs| self . intern_poly_existential_predicates ( xs) )
24852493 }
24862494
24872495 pub fn mk_predicates < I : InternAs < [ Predicate < ' tcx > ] , & ' tcx List < Predicate < ' tcx > > > > (
0 commit comments