Enum rustc_lint::unused::MustUsePath
source · enum MustUsePath {
Suppressed,
Def(Span, DefId, Option<Symbol>),
Boxed(Box<Self>),
Opaque(Box<Self>),
TraitObject(Box<Self>),
TupleElement(Vec<(usize, Self)>),
Array(Box<Self>, u64),
Closure(Span),
Generator(Span),
}Expand description
A path through a type to a must_use source. Contains useful info for the lint.
Variants§
Suppressed
Suppress must_use checking.
Def(Span, DefId, Option<Symbol>)
The root of the normal must_use lint with an optional message.
Boxed(Box<Self>)
Opaque(Box<Self>)
TraitObject(Box<Self>)
TupleElement(Vec<(usize, Self)>)
Array(Box<Self>, u64)
Closure(Span)
The root of the unused_closures lint.
Generator(Span)
The root of the unused_generators lint.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for MustUsePath
impl !Send for MustUsePath
impl !Sync for MustUsePath
impl Unpin for MustUsePath
impl UnwindSafe for MustUsePath
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: 32 bytes
Size for each variant:
Suppressed: 0 bytesDef: 20 bytesBoxed: 12 bytesOpaque: 12 bytesTraitObject: 12 bytesTupleElement: 28 bytesArray: 20 bytesClosure: 8 bytesGenerator: 8 bytes