@@ -13,7 +13,7 @@ use crate::infer::canonical::Canonical;
13
13
use crate :: mir:: ConstraintCategory ;
14
14
use crate :: ty:: abstract_const:: NotConstEvaluatable ;
15
15
use crate :: ty:: GenericArgsRef ;
16
- use crate :: ty:: { self , AdtKind , Ty , TyCtxt } ;
16
+ use crate :: ty:: { self , AdtKind , Ty } ;
17
17
18
18
use rustc_data_structures:: sync:: Lrc ;
19
19
use rustc_errors:: { Applicability , Diagnostic } ;
@@ -86,7 +86,7 @@ pub enum Reveal {
86
86
///
87
87
/// We do not want to intern this as there are a lot of obligation causes which
88
88
/// only live for a short period of time.
89
- #[ derive( Clone , Debug , PartialEq , Eq , Lift , HashStable , TyEncodable , TyDecodable ) ]
89
+ #[ derive( Clone , Debug , PartialEq , Eq , HashStable , TyEncodable , TyDecodable ) ]
90
90
#[ derive( TypeVisitable , TypeFoldable ) ]
91
91
pub struct ObligationCause < ' tcx > {
92
92
pub span : Span ,
@@ -194,15 +194,15 @@ impl<'tcx> ObligationCause<'tcx> {
194
194
}
195
195
}
196
196
197
- #[ derive( Clone , Debug , PartialEq , Eq , Lift , HashStable , TyEncodable , TyDecodable ) ]
197
+ #[ derive( Clone , Debug , PartialEq , Eq , HashStable , TyEncodable , TyDecodable ) ]
198
198
#[ derive( TypeVisitable , TypeFoldable ) ]
199
199
pub struct UnifyReceiverContext < ' tcx > {
200
200
pub assoc_item : ty:: AssocItem ,
201
201
pub param_env : ty:: ParamEnv < ' tcx > ,
202
202
pub args : GenericArgsRef < ' tcx > ,
203
203
}
204
204
205
- #[ derive( Clone , PartialEq , Eq , Lift , Default , HashStable ) ]
205
+ #[ derive( Clone , PartialEq , Eq , Default , HashStable ) ]
206
206
#[ derive( TypeVisitable , TypeFoldable , TyEncodable , TyDecodable ) ]
207
207
pub struct InternedObligationCauseCode < ' tcx > {
208
208
/// `None` for `ObligationCauseCode::MiscObligation` (a common case, occurs ~60% of
@@ -238,7 +238,7 @@ impl<'tcx> std::ops::Deref for InternedObligationCauseCode<'tcx> {
238
238
}
239
239
}
240
240
241
- #[ derive( Clone , Debug , PartialEq , Eq , Lift , HashStable , TyEncodable , TyDecodable ) ]
241
+ #[ derive( Clone , Debug , PartialEq , Eq , HashStable , TyEncodable , TyDecodable ) ]
242
242
#[ derive( TypeVisitable , TypeFoldable ) ]
243
243
pub enum ObligationCauseCode < ' tcx > {
244
244
/// Not well classified or should be obvious from the span.
@@ -470,7 +470,7 @@ pub enum WellFormedLoc {
470
470
} ,
471
471
}
472
472
473
- #[ derive( Clone , Debug , PartialEq , Eq , Lift , HashStable , TyEncodable , TyDecodable ) ]
473
+ #[ derive( Clone , Debug , PartialEq , Eq , HashStable , TyEncodable , TyDecodable ) ]
474
474
#[ derive( TypeVisitable , TypeFoldable ) ]
475
475
pub struct ImplDerivedObligationCause < ' tcx > {
476
476
pub derived : DerivedObligationCause < ' tcx > ,
@@ -524,14 +524,7 @@ pub enum StatementAsExpression {
524
524
NeedsBoxing ,
525
525
}
526
526
527
- impl < ' tcx > ty:: Lift < ' tcx > for StatementAsExpression {
528
- type Lifted = StatementAsExpression ;
529
- fn lift_to_tcx ( self , _tcx : TyCtxt < ' tcx > ) -> Option < StatementAsExpression > {
530
- Some ( self )
531
- }
532
- }
533
-
534
- #[ derive( Clone , Debug , PartialEq , Eq , Lift , HashStable , TyEncodable , TyDecodable ) ]
527
+ #[ derive( Clone , Debug , PartialEq , Eq , HashStable , TyEncodable , TyDecodable ) ]
535
528
#[ derive( TypeVisitable , TypeFoldable ) ]
536
529
pub struct MatchExpressionArmCause < ' tcx > {
537
530
pub arm_block_id : Option < hir:: HirId > ,
@@ -547,7 +540,7 @@ pub struct MatchExpressionArmCause<'tcx> {
547
540
}
548
541
549
542
#[ derive( Copy , Clone , Debug , PartialEq , Eq ) ]
550
- #[ derive( Lift , TypeFoldable , TypeVisitable , HashStable , TyEncodable , TyDecodable ) ]
543
+ #[ derive( TypeFoldable , TypeVisitable , HashStable , TyEncodable , TyDecodable ) ]
551
544
pub struct IfExpressionCause < ' tcx > {
552
545
pub then_id : hir:: HirId ,
553
546
pub else_id : hir:: HirId ,
@@ -557,7 +550,7 @@ pub struct IfExpressionCause<'tcx> {
557
550
pub opt_suggest_box_span : Option < Span > ,
558
551
}
559
552
560
- #[ derive( Clone , Debug , PartialEq , Eq , Lift , HashStable , TyEncodable , TyDecodable ) ]
553
+ #[ derive( Clone , Debug , PartialEq , Eq , HashStable , TyEncodable , TyDecodable ) ]
561
554
#[ derive( TypeVisitable , TypeFoldable ) ]
562
555
pub struct DerivedObligationCause < ' tcx > {
563
556
/// The trait predicate of the parent obligation that led to the
@@ -570,7 +563,7 @@ pub struct DerivedObligationCause<'tcx> {
570
563
pub parent_code : InternedObligationCauseCode < ' tcx > ,
571
564
}
572
565
573
- #[ derive( Clone , Debug , TypeVisitable , Lift ) ]
566
+ #[ derive( Clone , Debug , TypeVisitable ) ]
574
567
pub enum SelectionError < ' tcx > {
575
568
/// The trait is not implemented.
576
569
Unimplemented ,
@@ -593,7 +586,7 @@ pub enum SelectionError<'tcx> {
593
586
OpaqueTypeAutoTraitLeakageUnknown ( DefId ) ,
594
587
}
595
588
596
- #[ derive( Clone , Debug , TypeVisitable , Lift ) ]
589
+ #[ derive( Clone , Debug , TypeVisitable ) ]
597
590
pub struct SelectionOutputTypeParameterMismatch < ' tcx > {
598
591
pub found_trait_ref : ty:: PolyTraitRef < ' tcx > ,
599
592
pub expected_trait_ref : ty:: PolyTraitRef < ' tcx > ,
@@ -638,7 +631,7 @@ pub type SelectionResult<'tcx, T> = Result<Option<T>, SelectionError<'tcx>>;
638
631
/// ### The type parameter `N`
639
632
///
640
633
/// See explanation on `ImplSourceUserDefinedData`.
641
- #[ derive( Clone , PartialEq , Eq , TyEncodable , TyDecodable , HashStable , Lift ) ]
634
+ #[ derive( Clone , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
642
635
#[ derive( TypeFoldable , TypeVisitable ) ]
643
636
pub enum ImplSource < ' tcx , N > {
644
637
/// ImplSource identifying a particular impl.
@@ -704,7 +697,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
704
697
/// is `Obligation`, as one might expect. During codegen, however, this
705
698
/// is `()`, because codegen only requires a shallow resolution of an
706
699
/// impl, and nested obligations are satisfied later.
707
- #[ derive( Clone , PartialEq , Eq , TyEncodable , TyDecodable , HashStable , Lift ) ]
700
+ #[ derive( Clone , PartialEq , Eq , TyEncodable , TyDecodable , HashStable ) ]
708
701
#[ derive( TypeFoldable , TypeVisitable ) ]
709
702
pub struct ImplSourceUserDefinedData < ' tcx , N > {
710
703
pub impl_def_id : DefId ,
@@ -736,7 +729,7 @@ pub enum BuiltinImplSource {
736
729
TupleUnsizing ,
737
730
}
738
731
739
- TrivialTypeTraversalAndLiftImpls ! { BuiltinImplSource }
732
+ TrivialTypeTraversalImpls ! { BuiltinImplSource }
740
733
741
734
#[ derive( Clone , Debug , PartialEq , Eq , Hash , HashStable , PartialOrd , Ord ) ]
742
735
pub enum ObjectSafetyViolation {
0 commit comments