pub enum ObligationCauseCode<'tcx> {
MiscObligation,
ItemObligation(DefId),
ObjectCastObligation(Ty<'tcx>),
AssignmentLhsSized,
StructInitializerSized,
VariableType(NodeId),
ReturnType,
RepeatVec,
ClosureCapture(NodeId, Span, BuiltinBound),
FieldSized,
ObjectSized,
SharedStatic,
BuiltinDerivedObligation(DerivedObligationCause<'tcx>),
ImplDerivedObligation(DerivedObligationCause<'tcx>),
CompareImplMethodObligation,
}
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.
|
AssignmentLhsSized | Various cases where expressions must be sized/copy/etc:
|
StructInitializerSized | |
VariableType | |
ReturnType | |
RepeatVec | |
ClosureCapture | |
FieldSized | |
ObjectSized | |
SharedStatic | |
BuiltinDerivedObligation | |
ImplDerivedObligation | |
CompareImplMethodObligation | |
Trait Implementations
Derived Implementations