@@ -30,7 +30,6 @@ pub type ChalkCanonicalGoal<'tcx> = Canonical<'tcx, ChalkEnvironmentAndGoal<'tcx
3030
3131pub use self :: ImplSource :: * ;
3232pub use self :: ObligationCauseCode :: * ;
33- pub use self :: SelectionError :: * ;
3433
3534pub use self :: chalk:: {
3635 ChalkEnvironmentAndGoal , ChalkEnvironmentClause , RustInterner as ChalkRustInterner ,
@@ -86,7 +85,7 @@ pub enum Reveal {
8685///
8786/// We do not want to intern this as there are a lot of obligation causes which
8887/// only live for a short period of time.
89- #[ derive( Clone , PartialEq , Eq , Hash ) ]
88+ #[ derive( Clone , PartialEq , Eq , Hash , Lift ) ]
9089pub struct ObligationCause < ' tcx > {
9190 /// `None` for `ObligationCause::dummy`, `Some` otherwise.
9291 data : Option < Rc < ObligationCauseData < ' tcx > > > ,
@@ -111,7 +110,7 @@ impl Deref for ObligationCause<'tcx> {
111110 }
112111}
113112
114- #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
113+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Lift ) ]
115114pub struct ObligationCauseData < ' tcx > {
116115 pub span : Span ,
117116
@@ -169,14 +168,14 @@ impl<'tcx> ObligationCause<'tcx> {
169168 }
170169}
171170
172- #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
171+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Lift ) ]
173172pub struct UnifyReceiverContext < ' tcx > {
174173 pub assoc_item : ty:: AssocItem ,
175174 pub param_env : ty:: ParamEnv < ' tcx > ,
176175 pub substs : SubstsRef < ' tcx > ,
177176}
178177
179- #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
178+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Lift ) ]
180179pub enum ObligationCauseCode < ' tcx > {
181180 /// Not well classified or should be obvious from the span.
182181 MiscObligation ,
@@ -343,7 +342,7 @@ impl ObligationCauseCode<'_> {
343342#[ cfg( target_arch = "x86_64" ) ]
344343static_assert_size ! ( ObligationCauseCode <' _>, 32 ) ;
345344
346- #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
345+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Lift ) ]
347346pub struct MatchExpressionArmCause < ' tcx > {
348347 pub arm_span : Span ,
349348 pub source : hir:: MatchSource ,
@@ -359,7 +358,7 @@ pub struct IfExpressionCause {
359358 pub semicolon : Option < Span > ,
360359}
361360
362- #[ derive( Clone , Debug , PartialEq , Eq , Hash ) ]
361+ #[ derive( Clone , Debug , PartialEq , Eq , Hash , Lift ) ]
363362pub struct DerivedObligationCause < ' tcx > {
364363 /// The trait reference of the parent obligation that led to the
365364 /// current obligation. Note that only trait obligations lead to
@@ -371,7 +370,7 @@ pub struct DerivedObligationCause<'tcx> {
371370 pub parent_code : Rc < ObligationCauseCode < ' tcx > > ,
372371}
373372
374- #[ derive( Clone , Debug , TypeFoldable ) ]
373+ #[ derive( Clone , Debug , TypeFoldable , Lift ) ]
375374pub enum SelectionError < ' tcx > {
376375 Unimplemented ,
377376 OutputTypeParameterMismatch (
@@ -427,7 +426,7 @@ pub type SelectionResult<'tcx, T> = Result<Option<T>, SelectionError<'tcx>>;
427426/// ### The type parameter `N`
428427///
429428/// See explanation on `ImplSourceUserDefinedData`.
430- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
429+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
431430pub enum ImplSource < ' tcx , N > {
432431 /// ImplSource identifying a particular impl.
433432 ImplSourceUserDefined ( ImplSourceUserDefinedData < ' tcx , N > ) ,
@@ -558,14 +557,14 @@ impl<'tcx, N> ImplSource<'tcx, N> {
558557/// is `Obligation`, as one might expect. During codegen, however, this
559558/// is `()`, because codegen only requires a shallow resolution of an
560559/// 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 ) ]
562561pub struct ImplSourceUserDefinedData < ' tcx , N > {
563562 pub impl_def_id : DefId ,
564563 pub substs : SubstsRef < ' tcx > ,
565564 pub nested : Vec < N > ,
566565}
567566
568- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
567+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
569568pub struct ImplSourceGeneratorData < ' tcx , N > {
570569 pub generator_def_id : DefId ,
571570 pub substs : SubstsRef < ' tcx > ,
@@ -574,7 +573,7 @@ pub struct ImplSourceGeneratorData<'tcx, N> {
574573 pub nested : Vec < N > ,
575574}
576575
577- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
576+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
578577pub struct ImplSourceClosureData < ' tcx , N > {
579578 pub closure_def_id : DefId ,
580579 pub substs : SubstsRef < ' tcx > ,
@@ -583,18 +582,18 @@ pub struct ImplSourceClosureData<'tcx, N> {
583582 pub nested : Vec < N > ,
584583}
585584
586- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
585+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
587586pub struct ImplSourceAutoImplData < N > {
588587 pub trait_def_id : DefId ,
589588 pub nested : Vec < N > ,
590589}
591590
592- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
591+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
593592pub struct ImplSourceBuiltinData < N > {
594593 pub nested : Vec < N > ,
595594}
596595
597- #[ derive( PartialEq , Eq , Clone , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
596+ #[ derive( PartialEq , Eq , Clone , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
598597pub struct ImplSourceObjectData < ' tcx , N > {
599598 /// `Foo` upcast to the obligation trait. This will be some supertrait of `Foo`.
600599 pub upcast_trait_ref : ty:: PolyTraitRef < ' tcx > ,
@@ -607,17 +606,17 @@ pub struct ImplSourceObjectData<'tcx, N> {
607606 pub nested : Vec < N > ,
608607}
609608
610- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
609+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
611610pub struct ImplSourceFnPointerData < ' tcx , N > {
612611 pub fn_ty : Ty < ' tcx > ,
613612 pub nested : Vec < N > ,
614613}
615614
616615// 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 ) ]
618617pub struct ImplSourceDiscriminantKindData ;
619618
620- #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable ) ]
619+ #[ derive( Clone , PartialEq , Eq , RustcEncodable , RustcDecodable , HashStable , TypeFoldable , Lift ) ]
621620pub struct ImplSourceTraitAliasData < ' tcx , N > {
622621 pub alias_def_id : DefId ,
623622 pub substs : SubstsRef < ' tcx > ,
0 commit comments