@@ -1150,8 +1150,8 @@ impl<'tcx> ToPolyTraitRef<'tcx> for PolyTraitPredicate<'tcx> {
1150
1150
}
1151
1151
}
1152
1152
1153
- pub trait ToPredicate < ' tcx , Predicate > {
1154
- fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate ;
1153
+ pub trait ToPredicate < ' tcx , P = Predicate < ' tcx > > {
1154
+ fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> P ;
1155
1155
}
1156
1156
1157
1157
impl < ' tcx , T > ToPredicate < ' tcx , T > for T {
@@ -1160,21 +1160,21 @@ impl<'tcx, T> ToPredicate<'tcx, T> for T {
1160
1160
}
1161
1161
}
1162
1162
1163
- impl < ' tcx > ToPredicate < ' tcx , Predicate < ' tcx > > for Binder < ' tcx , PredicateKind < ' tcx > > {
1163
+ impl < ' tcx > ToPredicate < ' tcx > for Binder < ' tcx , PredicateKind < ' tcx > > {
1164
1164
#[ inline( always) ]
1165
1165
fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
1166
1166
tcx. mk_predicate ( self )
1167
1167
}
1168
1168
}
1169
1169
1170
- impl < ' tcx > ToPredicate < ' tcx , Predicate < ' tcx > > for Clause < ' tcx > {
1170
+ impl < ' tcx > ToPredicate < ' tcx > for Clause < ' tcx > {
1171
1171
#[ inline( always) ]
1172
1172
fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
1173
1173
tcx. mk_predicate ( ty:: Binder :: dummy ( ty:: PredicateKind :: Clause ( self ) ) )
1174
1174
}
1175
1175
}
1176
1176
1177
- impl < ' tcx > ToPredicate < ' tcx , Predicate < ' tcx > > for Binder < ' tcx , TraitRef < ' tcx > > {
1177
+ impl < ' tcx > ToPredicate < ' tcx > for Binder < ' tcx , TraitRef < ' tcx > > {
1178
1178
#[ inline( always) ]
1179
1179
fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
1180
1180
let pred: PolyTraitPredicate < ' tcx > = self . to_predicate ( tcx) ;
@@ -1193,25 +1193,25 @@ impl<'tcx> ToPredicate<'tcx, PolyTraitPredicate<'tcx>> for Binder<'tcx, TraitRef
1193
1193
}
1194
1194
}
1195
1195
1196
- impl < ' tcx > ToPredicate < ' tcx , Predicate < ' tcx > > for PolyTraitPredicate < ' tcx > {
1196
+ impl < ' tcx > ToPredicate < ' tcx > for PolyTraitPredicate < ' tcx > {
1197
1197
fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
1198
1198
self . map_bound ( |p| PredicateKind :: Clause ( Clause :: Trait ( p) ) ) . to_predicate ( tcx)
1199
1199
}
1200
1200
}
1201
1201
1202
- impl < ' tcx > ToPredicate < ' tcx , Predicate < ' tcx > > for PolyRegionOutlivesPredicate < ' tcx > {
1202
+ impl < ' tcx > ToPredicate < ' tcx > for PolyRegionOutlivesPredicate < ' tcx > {
1203
1203
fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
1204
1204
self . map_bound ( |p| PredicateKind :: Clause ( Clause :: RegionOutlives ( p) ) ) . to_predicate ( tcx)
1205
1205
}
1206
1206
}
1207
1207
1208
- impl < ' tcx > ToPredicate < ' tcx , Predicate < ' tcx > > for PolyTypeOutlivesPredicate < ' tcx > {
1208
+ impl < ' tcx > ToPredicate < ' tcx > for PolyTypeOutlivesPredicate < ' tcx > {
1209
1209
fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
1210
1210
self . map_bound ( |p| PredicateKind :: Clause ( Clause :: TypeOutlives ( p) ) ) . to_predicate ( tcx)
1211
1211
}
1212
1212
}
1213
1213
1214
- impl < ' tcx > ToPredicate < ' tcx , Predicate < ' tcx > > for PolyProjectionPredicate < ' tcx > {
1214
+ impl < ' tcx > ToPredicate < ' tcx > for PolyProjectionPredicate < ' tcx > {
1215
1215
fn to_predicate ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
1216
1216
self . map_bound ( |p| PredicateKind :: Clause ( Clause :: Projection ( p) ) ) . to_predicate ( tcx)
1217
1217
}
0 commit comments