Enum rustc::traits::ObligationCauseCode
[−]
[src]
pub enum ObligationCauseCode<'tcx> { MiscObligation, SliceOrArrayElem, TupleElem, ProjectionWf(ProjectionTy<'tcx>), ItemObligation(DefId), ReferenceOutlivesReferent(Ty<'tcx>), ObjectTypeBound(Ty<'tcx>, &'tcx Region), ObjectCastObligation(Ty<'tcx>), AssignmentLhsSized, StructInitializerSized, VariableType(NodeId), ReturnType, RepeatVec, FieldSized, ConstSized, SharedStatic, BuiltinDerivedObligation(DerivedObligationCause<'tcx>), ImplDerivedObligation(DerivedObligationCause<'tcx>), CompareImplMethodObligation { item_name: Name, impl_item_def_id: DefId, trait_item_def_id: DefId, lint_id: Option<NodeId>, }, ExprAssignable, MatchExpressionArm { arm_span: Span, source: MatchSource, }, IfExpression, IfExpressionWithNoElse, EquatePredicate, MainFunctionType, StartFunctionType, IntrinsicType, MethodReceiver, }
rustc_private
)Variants
MiscObligation
rustc_private
)Not well classified or should be obvious from span.
SliceOrArrayElem
rustc_private
)A slice or array is WF only if T: Sized
TupleElem
rustc_private
)A tuple is WF only if its middle elements are Sized
ProjectionWf(ProjectionTy<'tcx>)
rustc_private
)This is the trait reference from the given projection
ItemObligation(DefId)
rustc_private
)In an impl of trait X for type Y, type Y must also implement all supertraits of X.
ReferenceOutlivesReferent(Ty<'tcx>)
rustc_private
)A type like &'a T
is WF only if T: 'a
.
ObjectTypeBound(Ty<'tcx>, &'tcx Region)
rustc_private
)A type like Box<Foo<'a> + 'b>
is WF only if 'b: 'a
.
ObjectCastObligation(Ty<'tcx>)
rustc_private
)Obligation incurred due to an object cast.
AssignmentLhsSized
rustc_private
)Various cases where expressions must be sized/copy/etc:
StructInitializerSized
rustc_private
)VariableType(NodeId)
rustc_private
)ReturnType
rustc_private
)RepeatVec
rustc_private
)FieldSized
rustc_private
)ConstSized
rustc_private
)rustc_private
)BuiltinDerivedObligation(DerivedObligationCause<'tcx>)
rustc_private
)ImplDerivedObligation(DerivedObligationCause<'tcx>)
rustc_private
)CompareImplMethodObligation
rustc_private
)Fields of CompareImplMethodObligation
item_name: Name | 🔬 This is a nightly-only experimental API. ( rustc_private ) |
impl_item_def_id: DefId | 🔬 This is a nightly-only experimental API. ( rustc_private ) |
trait_item_def_id: DefId | 🔬 This is a nightly-only experimental API. ( rustc_private ) |
lint_id: Option<NodeId> | 🔬 This is a nightly-only experimental API. ( rustc_private ) |
ExprAssignable
rustc_private
)MatchExpressionArm
rustc_private
)Fields of MatchExpressionArm
arm_span: Span | 🔬 This is a nightly-only experimental API. ( rustc_private ) |
source: MatchSource | 🔬 This is a nightly-only experimental API. ( rustc_private ) |
IfExpression
rustc_private
)IfExpressionWithNoElse
rustc_private
)EquatePredicate
rustc_private
)MainFunctionType
rustc_private
)StartFunctionType
rustc_private
)IntrinsicType
rustc_private
)MethodReceiver
rustc_private
)Trait Implementations
impl<'a, 'tcx> Lift<'tcx> for ObligationCauseCode<'a>
[src]
type Lifted = ObligationCauseCode<'tcx>
rustc_private
)fn lift_to_tcx<'b, 'gcx>(&self,
tcx: TyCtxt<'b, 'gcx, 'tcx>)
-> Option<Self::Lifted>
tcx: TyCtxt<'b, 'gcx, 'tcx>)
-> Option<Self::Lifted>
rustc_private
)impl<'tcx> TypeFoldable<'tcx> for ObligationCauseCode<'tcx>
[src]
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self,
folder: &mut F)
-> Self
folder: &mut F)
-> Self
rustc_private
)fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
rustc_private
)fn fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(&self,
folder: &mut F)
-> Self
folder: &mut F)
-> Self
rustc_private
)fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool
rustc_private
)fn has_regions_escaping_depth(&self, depth: u32) -> bool
rustc_private
)fn has_escaping_regions(&self) -> bool
rustc_private
)fn has_type_flags(&self, flags: TypeFlags) -> bool
rustc_private
)fn has_projection_types(&self) -> bool
rustc_private
)fn references_error(&self) -> bool
rustc_private
)fn has_param_types(&self) -> bool
rustc_private
)fn has_self_ty(&self) -> bool
rustc_private
)fn has_infer_types(&self) -> bool
rustc_private
)fn needs_infer(&self) -> bool
rustc_private
)fn needs_subst(&self) -> bool
rustc_private
)fn has_re_skol(&self) -> bool
rustc_private
)fn has_closure_types(&self) -> bool
rustc_private
)fn has_erasable_regions(&self) -> bool
rustc_private
)fn is_normalized_for_trans(&self) -> bool
rustc_private
)fn is_global(&self) -> bool
rustc_private
)Indicates whether this value references only 'global' types/lifetimes that are the same regardless of what fn we are in. This is used for caching. Errs on the side of returning false. Read more
impl<'tcx> Clone for ObligationCauseCode<'tcx>
[src]
fn clone(&self) -> ObligationCauseCode<'tcx>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'tcx> Debug for ObligationCauseCode<'tcx>
[src]
impl<'tcx> PartialEq for ObligationCauseCode<'tcx>
[src]
fn eq(&self, __arg_0: &ObligationCauseCode<'tcx>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ObligationCauseCode<'tcx>) -> bool
This method tests for !=
.