@@ -234,8 +234,8 @@ pub enum ImplSubject<'tcx> {
234
234
Inherent ( Ty < ' tcx > ) ,
235
235
}
236
236
237
- #[ derive( Copy , Clone , PartialEq , Eq , Hash , TyEncodable , TyDecodable , HashStable , Debug ) ]
238
- #[ derive( TypeFoldable , TypeVisitable ) ]
237
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , PartialOrd , Ord ) ]
238
+ #[ derive( HashStable , TypeFoldable , TypeVisitable , TyEncodable , TyDecodable ) ]
239
239
pub enum ImplPolarity {
240
240
/// `impl Trait for Type`
241
241
Positive ,
@@ -491,7 +491,7 @@ impl EarlyParamRegion {
491
491
/// predicate which is emitted when a type is coerced to a trait object.
492
492
///
493
493
/// Use this rather than `PredicateKind`, whenever possible.
494
- #[ derive( Clone , Copy , PartialEq , Eq , Hash , HashStable ) ]
494
+ #[ derive( Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash , HashStable ) ]
495
495
#[ rustc_pass_by_value]
496
496
pub struct Predicate < ' tcx > (
497
497
Interned < ' tcx , WithCachedTypeInfo < ty:: Binder < ' tcx , PredicateKind < ' tcx > > > > ,
@@ -591,7 +591,7 @@ impl rustc_errors::IntoDiagnosticArg for Clause<'_> {
591
591
/// A subset of predicates which can be assumed by the trait solver. They show up in
592
592
/// an item's where clauses, hence the name `Clause`, and may either be user-written
593
593
/// (such as traits) or may be inserted during lowering.
594
- #[ derive( Clone , Copy , PartialEq , Eq , Hash , HashStable ) ]
594
+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , HashStable , PartialOrd , Ord ) ]
595
595
#[ rustc_pass_by_value]
596
596
pub struct Clause < ' tcx > ( Interned < ' tcx , WithCachedTypeInfo < ty:: Binder < ' tcx , PredicateKind < ' tcx > > > > ) ;
597
597
@@ -764,8 +764,8 @@ impl<'tcx> Clause<'tcx> {
764
764
}
765
765
}
766
766
767
- #[ derive( Clone , Copy , PartialEq , Eq , Hash , TyEncodable , TyDecodable ) ]
768
- #[ derive( HashStable , TypeFoldable , TypeVisitable , Lift ) ]
767
+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , PartialOrd , Ord ) ]
768
+ #[ derive( HashStable , TypeFoldable , TypeVisitable , Lift , TyEncodable , TyDecodable ) ]
769
769
pub struct TraitPredicate < ' tcx > {
770
770
pub trait_ref : TraitRef < ' tcx > ,
771
771
@@ -823,8 +823,8 @@ pub type PolyTypeOutlivesPredicate<'tcx> = ty::Binder<'tcx, TypeOutlivesPredicat
823
823
/// Encodes that `a` must be a subtype of `b`. The `a_is_expected` flag indicates
824
824
/// whether the `a` type is the type that we should label as "expected" when
825
825
/// presenting user diagnostics.
826
- #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , TyEncodable , TyDecodable ) ]
827
- #[ derive( HashStable , TypeFoldable , TypeVisitable , Lift ) ]
826
+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , PartialOrd , Ord ) ]
827
+ #[ derive( HashStable , TypeFoldable , TypeVisitable , Lift , TyEncodable , TyDecodable ) ]
828
828
pub struct SubtypePredicate < ' tcx > {
829
829
pub a_is_expected : bool ,
830
830
pub a : Ty < ' tcx > ,
@@ -833,8 +833,8 @@ pub struct SubtypePredicate<'tcx> {
833
833
pub type PolySubtypePredicate < ' tcx > = ty:: Binder < ' tcx , SubtypePredicate < ' tcx > > ;
834
834
835
835
/// Encodes that we have to coerce *from* the `a` type to the `b` type.
836
- #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , TyEncodable , TyDecodable ) ]
837
- #[ derive( HashStable , TypeFoldable , TypeVisitable , Lift ) ]
836
+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , PartialOrd , Ord ) ]
837
+ #[ derive( HashStable , TypeFoldable , TypeVisitable , Lift , TyEncodable , TyDecodable ) ]
838
838
pub struct CoercePredicate < ' tcx > {
839
839
pub a : Ty < ' tcx > ,
840
840
pub b : Ty < ' tcx > ,
@@ -1039,8 +1039,8 @@ impl From<ty::ConstVid> for TermVid {
1039
1039
/// equality between arbitrary types. Processing an instance of
1040
1040
/// Form #2 eventually yields one of these `ProjectionPredicate`
1041
1041
/// instances to normalize the LHS.
1042
- #[ derive( Copy , Clone , PartialEq , Eq , Hash , TyEncodable , TyDecodable ) ]
1043
- #[ derive( HashStable , TypeFoldable , TypeVisitable , Lift ) ]
1042
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , PartialOrd , Ord ) ]
1043
+ #[ derive( HashStable , TypeFoldable , TypeVisitable , Lift , TyEncodable , TyDecodable ) ]
1044
1044
pub struct ProjectionPredicate < ' tcx > {
1045
1045
pub projection_ty : AliasTy < ' tcx > ,
1046
1046
pub term : Term < ' tcx > ,
@@ -1102,8 +1102,8 @@ impl<'tcx> PolyProjectionPredicate<'tcx> {
1102
1102
1103
1103
/// Used by the new solver. Unlike a `ProjectionPredicate` this can only be
1104
1104
/// proven by actually normalizing `alias`.
1105
- #[ derive( Copy , Clone , PartialEq , Eq , Hash , TyEncodable , TyDecodable ) ]
1106
- #[ derive( HashStable , TypeFoldable , TypeVisitable , Lift ) ]
1105
+ #[ derive( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
1106
+ #[ derive( TyEncodable , TyDecodable , HashStable , TypeFoldable , TypeVisitable , Lift ) ]
1107
1107
pub struct NormalizesTo < ' tcx > {
1108
1108
pub alias : AliasTy < ' tcx > ,
1109
1109
pub term : Term < ' tcx > ,
0 commit comments