pub enum ObjectSafetyViolation {
SizedSelf(SmallVec<[Span; 1]>),
SupertraitSelf(SmallVec<[Span; 1]>),
Method(Symbol, MethodViolationCode, Span),
AssocConst(Symbol, Span),
GAT(Symbol, Span),
}
Variants§
SizedSelf(SmallVec<[Span; 1]>)
Self: Sized
declared on the trait.
SupertraitSelf(SmallVec<[Span; 1]>)
Supertrait reference references Self
an in illegal location
(e.g., trait Foo : Bar<Self>
).
Method(Symbol, MethodViolationCode, Span)
Method has something illegal.
AssocConst(Symbol, Span)
Associated const.
GAT(Symbol, Span)
GAT
Auto Trait Implementations§
impl RefUnwindSafe for ObjectSafetyViolation
impl !Send for ObjectSafetyViolation
impl !Sync for ObjectSafetyViolation
impl Unpin for ObjectSafetyViolation
impl UnwindSafe for ObjectSafetyViolation
Blanket Implementations§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 88 bytes
Size for each variant:
SizedSelf
: 28 bytesSupertraitSelf
: 28 bytesMethod
: 84 bytesAssocConst
: 12 bytesGAT
: 12 bytes