@@ -544,8 +544,8 @@ impl<'tcx> ToPolyTraitRef<'tcx> for PolyTraitPredicate<'tcx> {
544544 }
545545}
546546
547- pub trait Upcast < ' tcx , P = Predicate < ' tcx > > {
548- fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> P ;
547+ pub trait Upcast < ' tcx , T > {
548+ fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> T ;
549549}
550550
551551impl < ' tcx , T > Upcast < ' tcx , T > for T {
@@ -554,35 +554,35 @@ impl<'tcx, T> Upcast<'tcx, T> for T {
554554 }
555555}
556556
557- impl < ' tcx > Upcast < ' tcx > for PredicateKind < ' tcx > {
557+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for PredicateKind < ' tcx > {
558558 #[ inline( always) ]
559559 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
560560 ty:: Binder :: dummy ( self ) . upcast ( tcx)
561561 }
562562}
563563
564- impl < ' tcx > Upcast < ' tcx > for Binder < ' tcx , PredicateKind < ' tcx > > {
564+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for Binder < ' tcx , PredicateKind < ' tcx > > {
565565 #[ inline( always) ]
566566 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
567567 tcx. mk_predicate ( self )
568568 }
569569}
570570
571- impl < ' tcx > Upcast < ' tcx > for ClauseKind < ' tcx > {
571+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for ClauseKind < ' tcx > {
572572 #[ inline( always) ]
573573 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
574574 tcx. mk_predicate ( ty:: Binder :: dummy ( ty:: PredicateKind :: Clause ( self ) ) )
575575 }
576576}
577577
578- impl < ' tcx > Upcast < ' tcx > for Binder < ' tcx , ClauseKind < ' tcx > > {
578+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for Binder < ' tcx , ClauseKind < ' tcx > > {
579579 #[ inline( always) ]
580580 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
581581 tcx. mk_predicate ( self . map_bound ( ty:: PredicateKind :: Clause ) )
582582 }
583583}
584584
585- impl < ' tcx > Upcast < ' tcx > for Clause < ' tcx > {
585+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for Clause < ' tcx > {
586586 #[ inline( always) ]
587587 fn upcast ( self , _tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
588588 self . as_predicate ( )
@@ -603,7 +603,7 @@ impl<'tcx> Upcast<'tcx, Clause<'tcx>> for Binder<'tcx, ClauseKind<'tcx>> {
603603 }
604604}
605605
606- impl < ' tcx > Upcast < ' tcx > for TraitRef < ' tcx > {
606+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for TraitRef < ' tcx > {
607607 #[ inline( always) ]
608608 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
609609 ty:: Binder :: dummy ( self ) . upcast ( tcx)
@@ -625,7 +625,7 @@ impl<'tcx> Upcast<'tcx, Clause<'tcx>> for TraitRef<'tcx> {
625625 }
626626}
627627
628- impl < ' tcx > Upcast < ' tcx > for Binder < ' tcx , TraitRef < ' tcx > > {
628+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for Binder < ' tcx , TraitRef < ' tcx > > {
629629 #[ inline( always) ]
630630 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
631631 let pred: PolyTraitPredicate < ' tcx > = self . upcast ( tcx) ;
@@ -651,13 +651,13 @@ impl<'tcx> Upcast<'tcx, PolyTraitPredicate<'tcx>> for Binder<'tcx, TraitRef<'tcx
651651 }
652652}
653653
654- impl < ' tcx > Upcast < ' tcx > for TraitPredicate < ' tcx > {
654+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for TraitPredicate < ' tcx > {
655655 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
656656 PredicateKind :: Clause ( ClauseKind :: Trait ( self ) ) . upcast ( tcx)
657657 }
658658}
659659
660- impl < ' tcx > Upcast < ' tcx > for PolyTraitPredicate < ' tcx > {
660+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for PolyTraitPredicate < ' tcx > {
661661 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
662662 self . map_bound ( |p| PredicateKind :: Clause ( ClauseKind :: Trait ( p) ) ) . upcast ( tcx)
663663 }
@@ -677,25 +677,25 @@ impl<'tcx> Upcast<'tcx, Clause<'tcx>> for PolyTraitPredicate<'tcx> {
677677 }
678678}
679679
680- impl < ' tcx > Upcast < ' tcx > for PolyRegionOutlivesPredicate < ' tcx > {
680+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for PolyRegionOutlivesPredicate < ' tcx > {
681681 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
682682 self . map_bound ( |p| PredicateKind :: Clause ( ClauseKind :: RegionOutlives ( p) ) ) . upcast ( tcx)
683683 }
684684}
685685
686- impl < ' tcx > Upcast < ' tcx > for OutlivesPredicate < Ty < ' tcx > , ty:: Region < ' tcx > > {
686+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for OutlivesPredicate < Ty < ' tcx > , ty:: Region < ' tcx > > {
687687 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
688688 ty:: Binder :: dummy ( PredicateKind :: Clause ( ClauseKind :: TypeOutlives ( self ) ) ) . upcast ( tcx)
689689 }
690690}
691691
692- impl < ' tcx > Upcast < ' tcx > for ProjectionPredicate < ' tcx > {
692+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for ProjectionPredicate < ' tcx > {
693693 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
694694 ty:: Binder :: dummy ( PredicateKind :: Clause ( ClauseKind :: Projection ( self ) ) ) . upcast ( tcx)
695695 }
696696}
697697
698- impl < ' tcx > Upcast < ' tcx > for PolyProjectionPredicate < ' tcx > {
698+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for PolyProjectionPredicate < ' tcx > {
699699 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
700700 self . map_bound ( |p| PredicateKind :: Clause ( ClauseKind :: Projection ( p) ) ) . upcast ( tcx)
701701 }
@@ -715,7 +715,7 @@ impl<'tcx> Upcast<'tcx, Clause<'tcx>> for PolyProjectionPredicate<'tcx> {
715715 }
716716}
717717
718- impl < ' tcx > Upcast < ' tcx > for NormalizesTo < ' tcx > {
718+ impl < ' tcx > Upcast < ' tcx , ty :: Predicate < ' tcx > > for NormalizesTo < ' tcx > {
719719 fn upcast ( self , tcx : TyCtxt < ' tcx > ) -> Predicate < ' tcx > {
720720 PredicateKind :: NormalizesTo ( self ) . upcast ( tcx)
721721 }
0 commit comments