@@ -30,7 +30,6 @@ pub type ChalkCanonicalGoal<'tcx> = Canonical<'tcx, ChalkEnvironmentAndGoal<'tcx
30
30
31
31
pub use self :: ImplSource :: * ;
32
32
pub use self :: ObligationCauseCode :: * ;
33
- pub use self :: SelectionError :: * ;
34
33
35
34
pub use self :: chalk:: {
36
35
ChalkEnvironmentAndGoal , ChalkEnvironmentClause , RustInterner as ChalkRustInterner ,
@@ -86,7 +85,7 @@ pub enum Reveal {
86
85
///
87
86
/// We do not want to intern this as there are a lot of obligation causes which
88
87
/// only live for a short period of time.
89
- #[ derive( Clone , PartialEq , Eq , Hash ) ]
88
+ #[ derive( Clone , PartialEq , Eq , Hash , Lift ) ]
90
89
pub struct ObligationCause < ' tcx > {
91
90
/// `None` for `ObligationCause::dummy`, `Some` otherwise.
92
91
data : Option < Rc < ObligationCauseData < ' tcx > > > ,
@@ -111,7 +110,7 @@ impl Deref for ObligationCause<'tcx> {
111
110
}
112
111
}
113
112
114
- #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
113
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Lift ) ]
115
114
pub struct ObligationCauseData < ' tcx > {
116
115
pub span : Span ,
117
116
@@ -169,14 +168,14 @@ impl<'tcx> ObligationCause<'tcx> {
169
168
}
170
169
}
171
170
172
- #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
171
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Lift ) ]
173
172
pub struct UnifyReceiverContext < ' tcx > {
174
173
pub assoc_item : ty:: AssocItem ,
175
174
pub param_env : ty:: ParamEnv < ' tcx > ,
176
175
pub substs : SubstsRef < ' tcx > ,
177
176
}
178
177
179
- #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
178
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Lift ) ]
180
179
pub enum ObligationCauseCode < ' tcx > {
181
180
/// Not well classified or should be obvious from the span.
182
181
MiscObligation ,
@@ -343,7 +342,7 @@ impl ObligationCauseCode<'_> {
343
342
#[ cfg( target_arch = "x86_64" ) ]
344
343
static_assert_size ! ( ObligationCauseCode <' _>, 32 ) ;
345
344
346
- #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
345
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Lift ) ]
347
346
pub struct MatchExpressionArmCause < ' tcx > {
348
347
pub arm_span : Span ,
349
348
pub source : hir:: MatchSource ,
@@ -359,7 +358,7 @@ pub struct IfExpressionCause {
359
358
pub semicolon : Option < Span > ,
360
359
}
361
360
362
- #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
361
+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Lift ) ]
363
362
pub struct DerivedObligationCause < ' tcx > {
364
363
/// The trait reference of the parent obligation that led to the
365
364
/// current obligation. Note that only trait obligations lead to
@@ -371,7 +370,7 @@ pub struct DerivedObligationCause<'tcx> {
371
370
pub parent_code : Rc < ObligationCauseCode < ' tcx > > ,
372
371
}
373
372
374
- #[ derive( Clone , Debug , TypeFoldable ) ]
373
+ #[ derive( Clone , Debug , TypeFoldable , Lift ) ]
375
374
pub enum SelectionError < ' tcx > {
376
375
Unimplemented ,
377
376
OutputTypeParameterMismatch (
@@ -427,7 +426,7 @@ pub type SelectionResult<'tcx, T> = Result<Option<T>, SelectionError<'tcx>>;
427
426
/// ### The type parameter `N`
428
427
///
429
428
/// See explanation on `ImplSourceUserDefinedData`.
430
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
429
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
431
430
pub enum ImplSource < ' tcx , N > {
432
431
/// ImplSource identifying a particular impl.
433
432
ImplSourceUserDefined ( ImplSourceUserDefinedData < ' tcx , N > ) ,
@@ -558,14 +557,14 @@ impl<'tcx, N> ImplSource<'tcx, N> {
558
557
/// is `Obligation`, as one might expect. During codegen, however, this
559
558
/// is `()`, because codegen only requires a shallow resolution of an
560
559
/// impl, and nested obligations are satisfied later.
561
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
560
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
562
561
pub struct ImplSourceUserDefinedData < ' tcx , N > {
563
562
pub impl_def_id : DefId ,
564
563
pub substs : SubstsRef < ' tcx > ,
565
564
pub nested : Vec < N > ,
566
565
}
567
566
568
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
567
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
569
568
pub struct ImplSourceGeneratorData < ' tcx , N > {
570
569
pub generator_def_id : DefId ,
571
570
pub substs : SubstsRef < ' tcx > ,
@@ -574,7 +573,7 @@ pub struct ImplSourceGeneratorData<'tcx, N> {
574
573
pub nested : Vec < N > ,
575
574
}
576
575
577
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
576
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
578
577
pub struct ImplSourceClosureData < ' tcx , N > {
579
578
pub closure_def_id : DefId ,
580
579
pub substs : SubstsRef < ' tcx > ,
@@ -583,18 +582,18 @@ pub struct ImplSourceClosureData<'tcx, N> {
583
582
pub nested : Vec < N > ,
584
583
}
585
584
586
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
585
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
587
586
pub struct ImplSourceAutoImplData < N > {
588
587
pub trait_def_id : DefId ,
589
588
pub nested : Vec < N > ,
590
589
}
591
590
592
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
591
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
593
592
pub struct ImplSourceBuiltinData < N > {
594
593
pub nested : Vec < N > ,
595
594
}
596
595
597
- #[ derive( PartialEq , Eq , Clone , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
596
+ #[ derive( PartialEq , Eq , Clone , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
598
597
pub struct ImplSourceObjectData < ' tcx , N > {
599
598
/// `Foo` upcast to the obligation trait. This will be some supertrait of `Foo`.
600
599
pub upcast_trait_ref : ty:: PolyTraitRef < ' tcx > ,
@@ -607,17 +606,17 @@ pub struct ImplSourceObjectData<'tcx, N> {
607
606
pub nested : Vec < N > ,
608
607
}
609
608
610
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
609
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
611
610
pub struct ImplSourceFnPointerData < ' tcx , N > {
612
611
pub fn_ty : Ty < ' tcx > ,
613
612
pub nested : Vec < N > ,
614
613
}
615
614
616
615
// FIXME(@lcnr): This should be refactored and merged with other builtin vtables.
617
- #[ derive( Clone , Debug , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
616
+ #[ derive( Clone , Debug , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable ) ]
618
617
pub struct ImplSourceDiscriminantKindData ;
619
618
620
- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
619
+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
621
620
pub struct ImplSourceTraitAliasData < ' tcx , N > {
622
621
pub alias_def_id : DefId ,
623
622
pub substs : SubstsRef < ' tcx > ,
0 commit comments