@@ -87,7 +87,7 @@ pub struct CtxtInterners<'tcx> {
87
87
substs : InternedSet < ' tcx , InternalSubsts < ' tcx > > ,
88
88
canonical_var_infos : InternedSet < ' tcx , List < CanonicalVarInfo < ' tcx > > > ,
89
89
region : InternedSet < ' tcx , RegionKind > ,
90
- existential_predicates : InternedSet < ' tcx , List < ExistentialPredicate < ' tcx > > > ,
90
+ poly_existential_predicates : InternedSet < ' tcx , List < ty :: Binder < ExistentialPredicate < ' tcx > > > > ,
91
91
predicate : InternedSet < ' tcx , PredicateInner < ' tcx > > ,
92
92
predicates : InternedSet < ' tcx , List < Predicate < ' tcx > > > ,
93
93
projs : InternedSet < ' tcx , List < ProjectionKind > > ,
@@ -103,7 +103,7 @@ impl<'tcx> CtxtInterners<'tcx> {
103
103
type_list : Default :: default ( ) ,
104
104
substs : Default :: default ( ) ,
105
105
region : Default :: default ( ) ,
106
- existential_predicates : Default :: default ( ) ,
106
+ poly_existential_predicates : Default :: default ( ) ,
107
107
canonical_var_infos : Default :: default ( ) ,
108
108
predicate : Default :: default ( ) ,
109
109
predicates : Default :: default ( ) ,
@@ -1610,7 +1610,7 @@ nop_lift! {const_; &'a Const<'a> => &'tcx Const<'tcx>}
1610
1610
nop_lift ! { predicate; & ' a PredicateInner <' a> => & ' tcx PredicateInner <' tcx>}
1611
1611
1612
1612
nop_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> >}
1614
1614
nop_list_lift ! { predicates; Predicate <' a> => Predicate <' tcx>}
1615
1615
nop_list_lift ! { canonical_var_infos; CanonicalVarInfo <' a> => CanonicalVarInfo <' tcx>}
1616
1616
nop_list_lift ! { projs; ProjectionKind => ProjectionKind }
@@ -2051,7 +2051,8 @@ slice_interners!(
2051
2051
type_list: _intern_type_list( Ty <' tcx>) ,
2052
2052
substs: _intern_substs( GenericArg <' tcx>) ,
2053
2053
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>>) ,
2055
2056
predicates: _intern_predicates( Predicate <' tcx>) ,
2056
2057
projs: _intern_projs( ProjectionKind ) ,
2057
2058
place_elems: _intern_place_elems( PlaceElem <' tcx>) ,
@@ -2282,7 +2283,7 @@ impl<'tcx> TyCtxt<'tcx> {
2282
2283
#[ inline]
2283
2284
pub fn mk_dynamic (
2284
2285
self ,
2285
- obj : ty :: Binder < & ' tcx List < ExistentialPredicate < ' tcx > > > ,
2286
+ obj : & ' tcx List < ty :: Binder < ExistentialPredicate < ' tcx > > > ,
2286
2287
reg : ty:: Region < ' tcx > ,
2287
2288
) -> Ty < ' tcx > {
2288
2289
self . mk_ty ( Dynamic ( obj, reg) )
@@ -2412,13 +2413,17 @@ impl<'tcx> TyCtxt<'tcx> {
2412
2413
Place { local : place. local , projection : self . intern_place_elems ( & projection) }
2413
2414
}
2414
2415
2415
- pub fn intern_existential_predicates (
2416
+ pub fn intern_poly_existential_predicates (
2416
2417
self ,
2417
- eps : & [ ExistentialPredicate < ' tcx > ] ,
2418
- ) -> & ' tcx List < ExistentialPredicate < ' tcx > > {
2418
+ eps : & [ ty :: Binder < ExistentialPredicate < ' tcx > > ] ,
2419
+ ) -> & ' tcx List < ty :: Binder < ExistentialPredicate < ' tcx > > > {
2419
2420
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)
2422
2427
}
2423
2428
2424
2429
pub fn intern_predicates ( self , preds : & [ Predicate < ' tcx > ] ) -> & ' tcx List < Predicate < ' tcx > > {
@@ -2475,13 +2480,16 @@ impl<'tcx> TyCtxt<'tcx> {
2475
2480
} )
2476
2481
}
2477
2482
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
+ > ,
2480
2488
> (
2481
2489
self ,
2482
2490
iter : I ,
2483
2491
) -> I :: Output {
2484
- iter. intern_with ( |xs| self . intern_existential_predicates ( xs) )
2492
+ iter. intern_with ( |xs| self . intern_poly_existential_predicates ( xs) )
2485
2493
}
2486
2494
2487
2495
pub fn mk_predicates < I : InternAs < [ Predicate < ' tcx > ] , & ' tcx List < Predicate < ' tcx > > > > (
0 commit comments