@@ -11,7 +11,7 @@ use std::cmp::Ordering;
11
11
use crate :: ty:: visit:: TypeVisitableExt ;
12
12
use crate :: ty:: {
13
13
self , AliasTy , Binder , DebruijnIndex , DebugWithInfcx , EarlyBinder , GenericArg , GenericArgs ,
14
- GenericArgsRef , ImplPolarity , Term , Ty , TyCtxt , TypeFlags , WithCachedTypeInfo ,
14
+ GenericArgsRef , PredicatePolarity , Term , Ty , TyCtxt , TypeFlags , WithCachedTypeInfo ,
15
15
} ;
16
16
17
17
pub type ClauseKind < ' tcx > = IrClauseKind < TyCtxt < ' tcx > > ;
@@ -70,7 +70,7 @@ impl<'tcx> Predicate<'tcx> {
70
70
polarity,
71
71
} ) ) => Some ( PredicateKind :: Clause ( ClauseKind :: Trait ( TraitPredicate {
72
72
trait_ref,
73
- polarity : polarity. flip ( ) ? ,
73
+ polarity : polarity. flip ( ) ,
74
74
} ) ) ) ,
75
75
76
76
_ => None ,
@@ -663,7 +663,7 @@ pub struct TraitPredicate<'tcx> {
663
663
/// exist via a series of predicates.)
664
664
///
665
665
/// If polarity is Reserved: that's a bug.
666
- pub polarity : ImplPolarity ,
666
+ pub polarity : PredicatePolarity ,
667
667
}
668
668
669
669
pub type PolyTraitPredicate < ' tcx > = ty:: Binder < ' tcx , TraitPredicate < ' tcx > > ;
@@ -693,7 +693,7 @@ impl<'tcx> PolyTraitPredicate<'tcx> {
693
693
}
694
694
695
695
#[ inline]
696
- pub fn polarity ( self ) -> ImplPolarity {
696
+ pub fn polarity ( self ) -> PredicatePolarity {
697
697
self . skip_binder ( ) . polarity
698
698
}
699
699
}
@@ -907,7 +907,7 @@ impl<'tcx> ToPredicate<'tcx> for TraitRef<'tcx> {
907
907
impl < ' tcx > ToPredicate < ' tcx , TraitPredicate < ' tcx > > for TraitRef < ' tcx > {
908
908
#[ inline( always) ]
909
909
fn to_predicate ( self , _tcx : TyCtxt < ' tcx > ) -> TraitPredicate < ' tcx > {
910
- TraitPredicate { trait_ref : self , polarity : ImplPolarity :: Positive }
910
+ TraitPredicate { trait_ref : self , polarity : PredicatePolarity :: Positive }
911
911
}
912
912
}
913
913
@@ -940,7 +940,7 @@ impl<'tcx> ToPredicate<'tcx, PolyTraitPredicate<'tcx>> for Binder<'tcx, TraitRef
940
940
fn to_predicate ( self , _: TyCtxt < ' tcx > ) -> PolyTraitPredicate < ' tcx > {
941
941
self . map_bound ( |trait_ref| TraitPredicate {
942
942
trait_ref,
943
- polarity : ty:: ImplPolarity :: Positive ,
943
+ polarity : ty:: PredicatePolarity :: Positive ,
944
944
} )
945
945
}
946
946
}
0 commit comments