@@ -96,13 +96,13 @@ pub use self::list::{List, ListWithCachedTypeInfo};
96
96
pub use self :: parameterized:: ParameterizedOverTcx ;
97
97
pub use self :: pattern:: { Pattern , PatternKind } ;
98
98
pub use self :: predicate:: {
99
- Clause , ClauseKind , CoercePredicate , ExistentialPredicate , ExistentialProjection ,
100
- ExistentialTraitRef , NormalizesTo , OutlivesPredicate , PolyCoercePredicate ,
101
- PolyExistentialPredicate , PolyExistentialProjection , PolyExistentialTraitRef ,
102
- PolyProjectionPredicate , PolyRegionOutlivesPredicate , PolySubtypePredicate , PolyTraitPredicate ,
103
- PolyTraitRef , PolyTypeOutlivesPredicate , Predicate , PredicateKind , ProjectionPredicate ,
104
- RegionOutlivesPredicate , SubtypePredicate , ToPolyTraitRef , ToPredicate , TraitPredicate ,
105
- TraitRef , TypeOutlivesPredicate ,
99
+ Clause , ClauseKind , CoercePredicate , ExistentialPredicate , ExistentialPredicateStableCmpExt ,
100
+ ExistentialProjection , ExistentialTraitRef , NormalizesTo , OutlivesPredicate ,
101
+ PolyCoercePredicate , PolyExistentialPredicate , PolyExistentialProjection ,
102
+ PolyExistentialTraitRef , PolyProjectionPredicate , PolyRegionOutlivesPredicate ,
103
+ PolySubtypePredicate , PolyTraitPredicate , PolyTraitRef , PolyTypeOutlivesPredicate , Predicate ,
104
+ PredicateKind , ProjectionPredicate , RegionOutlivesPredicate , SubtypePredicate , ToPolyTraitRef ,
105
+ ToPredicate , TraitPredicate , TraitRef , TypeOutlivesPredicate ,
106
106
} ;
107
107
pub use self :: region:: {
108
108
BoundRegion , BoundRegionKind , BoundRegionKind :: * , EarlyParamRegion , LateParamRegion , Region ,
@@ -275,61 +275,6 @@ pub enum ImplSubject<'tcx> {
275
275
Inherent ( Ty < ' tcx > ) ,
276
276
}
277
277
278
- #[ derive( Copy , Clone , PartialEq , Eq , Hash , TyEncodable , TyDecodable , HashStable , Debug ) ]
279
- #[ derive( TypeFoldable , TypeVisitable ) ]
280
- pub enum ImplPolarity {
281
- /// `impl Trait for Type`
282
- Positive ,
283
- /// `impl !Trait for Type`
284
- Negative ,
285
- /// `#[rustc_reservation_impl] impl Trait for Type`
286
- ///
287
- /// This is a "stability hack", not a real Rust feature.
288
- /// See #64631 for details.
289
- Reservation ,
290
- }
291
-
292
- impl fmt:: Display for ImplPolarity {
293
- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
294
- match self {
295
- Self :: Positive => f. write_str ( "positive" ) ,
296
- Self :: Negative => f. write_str ( "negative" ) ,
297
- Self :: Reservation => f. write_str ( "reservation" ) ,
298
- }
299
- }
300
- }
301
-
302
- /// Polarity for a trait predicate. May either be negative or positive.
303
- /// Distinguished from [`ImplPolarity`] since we never compute goals with
304
- /// "reservation" level.
305
- #[ derive( Copy , Clone , PartialEq , Eq , Hash , TyEncodable , TyDecodable , HashStable , Debug ) ]
306
- #[ derive( TypeFoldable , TypeVisitable ) ]
307
- pub enum PredicatePolarity {
308
- /// `Type: Trait`
309
- Positive ,
310
- /// `Type: !Trait`
311
- Negative ,
312
- }
313
-
314
- impl PredicatePolarity {
315
- /// Flips polarity by turning `Positive` into `Negative` and `Negative` into `Positive`.
316
- pub fn flip ( & self ) -> PredicatePolarity {
317
- match self {
318
- PredicatePolarity :: Positive => PredicatePolarity :: Negative ,
319
- PredicatePolarity :: Negative => PredicatePolarity :: Positive ,
320
- }
321
- }
322
- }
323
-
324
- impl fmt:: Display for PredicatePolarity {
325
- fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
326
- match self {
327
- Self :: Positive => f. write_str ( "positive" ) ,
328
- Self :: Negative => f. write_str ( "negative" ) ,
329
- }
330
- }
331
- }
332
-
333
278
#[ derive( Copy , Clone , PartialEq , Eq , Hash , TyEncodable , TyDecodable , HashStable , Debug ) ]
334
279
#[ derive( TypeFoldable , TypeVisitable ) ]
335
280
pub enum Asyncness {
0 commit comments