[−][src]Enum rustc_middle::traits::ObligationCauseCode
Variants
Not well classified or should be obvious from the span.
A slice or array is WF only if T: Sized.
A tuple is WF only if its middle elements are Sized.
ProjectionWf(ProjectionTy<'tcx>)This is the trait reference from the given projection.
ItemObligation(DefId)In an impl of trait X for type Y, type Y must
also implement all supertraits of X.
Like ItemObligation, but with extra detail on the source of the obligation.
ReferenceOutlivesReferent(Ty<'tcx>)A type like &'a T is WF only if T: 'a.
A type like Box<Foo<'a> + 'b> is WF only if 'b: 'a.
ObjectCastObligation(Ty<'tcx>)Obligation incurred due to an object cast.
Obligation incurred due to a coercion.
Various cases where expressions must be Sized / Copy / etc.
L = X implies that L is Sized.
(x1, .., xn) must be Sized.
S { ... } must be Sized.
VariableType(HirId)Type of each variable must be Sized.
Argument type must be Sized.
Return type must be Sized.
Yield type must be Sized.
Inline asm operand type must be Sized.
RepeatVec(bool)[T, ..n] implies that T must be Copy.
If true, suggest const_in_array_repeat_expressions feature flag.
Types of fields (other than the last, except for packed structs) in a struct must be sized.
Constant expressions must be sized.
static items must have Sync type.
BuiltinDerivedObligation(DerivedObligationCause<'tcx>)ImplDerivedObligation(DerivedObligationCause<'tcx>)DerivedObligation(DerivedObligationCause<'tcx>)Error derived when matching traits/impls; see ObligationCause for more details
Error derived when matching traits/impls; see ObligationCause for more details
Fields of CompareImplMethodObligation
Error derived when matching traits/impls; see ObligationCause for more details
Checking that this expression can be assigned where it needs to be
MatchExpressionArm(Box<MatchExpressionArmCause<'tcx>>)Computing common supertype in the arms of a match expression
Type error arising from type checking a pattern against an expected type.
Fields of Pattern
Constants in patterns must have Structural type.
IfExpression(Box<IfExpressionCause>)Computing common supertype in an if expression
Computing common supertype of an if expression with no else counter-part
main has wrong type
start has wrong type
Intrinsic has wrong type
Method receiver
UnifyReceiver(Box<UnifyReceiverContext<'tcx>>)return with no expression
ReturnValue(HirId)return with an expression
Return type of this function
BlockTailExpression(HirId)Block implicit return
#[feature(trivial_bounds)] is not enabled
Implementations
impl<'_> ObligationCauseCode<'_>[src]
pub fn peel_derives(&self) -> &Self[src]
Trait Implementations
impl<'tcx> Clone for ObligationCauseCode<'tcx>[src]
pub fn clone(&self) -> ObligationCauseCode<'tcx>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'tcx> Debug for ObligationCauseCode<'tcx>[src]
impl<'tcx> Eq for ObligationCauseCode<'tcx>[src]
impl<'tcx> Hash for ObligationCauseCode<'tcx>[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<'tcx, '__lifted> Lift<'__lifted> for ObligationCauseCode<'tcx>[src]
type Lifted = ObligationCauseCode<'__lifted>
pub fn lift_to_tcx(
self,
__tcx: TyCtxt<'__lifted>
) -> Option<ObligationCauseCode<'__lifted>>[src]
self,
__tcx: TyCtxt<'__lifted>
) -> Option<ObligationCauseCode<'__lifted>>
impl<'tcx> PartialEq<ObligationCauseCode<'tcx>> for ObligationCauseCode<'tcx>[src]
pub fn eq(&self, other: &ObligationCauseCode<'tcx>) -> bool[src]
pub fn ne(&self, other: &ObligationCauseCode<'tcx>) -> bool[src]
impl<'tcx> StructuralEq for ObligationCauseCode<'tcx>[src]
impl<'tcx> StructuralPartialEq for ObligationCauseCode<'tcx>[src]
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for ObligationCauseCode<'tcx>
impl<'tcx> !Send for ObligationCauseCode<'tcx>
impl<'tcx> !Sync for ObligationCauseCode<'tcx>
impl<'tcx> Unpin for ObligationCauseCode<'tcx>
impl<'tcx> !UnwindSafe for ObligationCauseCode<'tcx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> MaybeResult<T> for T[src]
type Error = !
pub fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T[src]
pub fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.