Enum rustc::middle::traits::ObligationCauseCodeExperimental [-]  [+] [src]

pub enum ObligationCauseCode<'tcx> {
    MiscObligation,
    ItemObligation(DefId),
    ObjectCastObligation(Ty<'tcx>),
    DropTrait,
    AssignmentLhsSized,
    StructInitializerSized,
    VariableType(NodeId),
    ReturnType,
    RepeatVec,
    ClosureCapture(NodeId, Span),
    FieldSized,
    ObjectSized,
}

Variants

MiscObligation

Not well classified or should be obvious from span.

ItemObligation

In an impl of trait X for type Y, type Y must also implement all supertraits of X.

ObjectCastObligation

Obligation incurred due to an object cast.

DropTrait

To implement drop, type must be sendable.

AssignmentLhsSized

Various cases where expressions must be sized/copy/etc:

StructInitializerSized
VariableType
ReturnType
RepeatVec
ClosureCapture
FieldSized
ObjectSized

Trait Implementations

Derived Implementations

impl<'tcx> Clone for ObligationCauseCode<'tcx>

fn clone(&self) -> ObligationCauseCode<'tcx>

fn clone_from(&mut self, source: &Self)