Enum rustc_trait_selection::traits::MethodViolationCode [−][src]
pub enum MethodViolationCode {
StaticMethod(Option<(&'static str, Span)>, Span, bool),
ReferencesSelfInput(usize),
ReferencesSelfOutput,
WhereClauseReferencesSelf,
Generic,
UndispatchableReceiver,
}Expand description
Reasons a method might not be object-safe.
Variants
e.g., fn foo()
ReferencesSelfInput(usize)e.g., fn foo(&self, x: Self)
e.g., fn foo(&self) -> Self
e.g., fn foo(&self) where Self: Clone
e.g., fn foo<A>()
the method’s receiver (self argument) can’t be dispatched on
Auto Trait Implementations
impl RefUnwindSafe for MethodViolationCodeimpl !Send for MethodViolationCodeimpl !Sync for MethodViolationCodeimpl Unpin for MethodViolationCodeimpl UnwindSafe for MethodViolationCodeBlanket Implementations
pub fn allocate_from_iter(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = T>
) -> &'a mut [T]Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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: 40 bytes