Enum rustc_infer::traits::ObjectSafetyViolation
source · 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
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