pub enum BuiltinLintDiag {
Show 22 variants
AbsPathWithModule(Span),
ElidedLifetimesInPaths(usize, Span, bool, Span),
UnusedImports {
remove_whole_use: bool,
num_to_remove: usize,
remove_spans: Vec<Span>,
test_module_span: Option<Span>,
span_snippets: Vec<String>,
},
RedundantImport(Vec<(Span, bool)>, Ident),
DeprecatedMacro {
suggestion: Option<Symbol>,
suggestion_span: Span,
note: Option<Symbol>,
path: String,
since_kind: DeprecatedSinceKind,
},
PatternsInFnsWithoutBody {
span: Span,
ident: Ident,
is_foreign: bool,
},
ReservedPrefix(Span, String),
RawPrefix(Span),
ReservedString {
is_string: bool,
suggestion: Span,
},
BreakWithLabelAndLoop(Span),
UnicodeTextFlow(Span, String),
UnexpectedCfgName((Symbol, Span), Option<(Symbol, Span)>),
UnexpectedCfgValue((Symbol, Span), Option<(Symbol, Span)>),
DeprecatedWhereclauseLocation(Span, Option<(Span, String)>),
SingleUseLifetime {
param_span: Span,
deletion_span: Option<Span>,
use_span: Option<(Span, bool)>,
ident: Ident,
},
NamedArgumentUsedPositionally {
position_sp_to_replace: Option<Span>,
position_sp_for_msg: Option<Span>,
named_arg_sp: Span,
named_arg_name: String,
is_formatting_arg: bool,
},
AmbiguousGlobReexports {
name: String,
namespace: String,
first_reexport_span: Span,
duplicate_reexport_span: Span,
},
HiddenGlobReexports {
name: String,
namespace: String,
glob_reexport_span: Span,
private_item_span: Span,
},
UnusedQualifications {
removal_span: Span,
},
AssociatedConstElidedLifetime {
elided: bool,
span: Span,
lifetimes_in_scope: MultiSpan,
},
UnusedCrateDependency {
extern_crate: Symbol,
local_crate: Symbol,
},
IllFormedAttributeInput {
suggestions: Vec<String>,
docs: Option<&'static str>,
},
}Variants§
AbsPathWithModule(Span)
ElidedLifetimesInPaths(usize, Span, bool, Span)
UnusedImports
Fields
RedundantImport(Vec<(Span, bool)>, Ident)
DeprecatedMacro
PatternsInFnsWithoutBody
ReservedPrefix(Span, String)
RawPrefix(Span)
'r# in edition < 2021.
ReservedString
## or #" in edition < 2024.
BreakWithLabelAndLoop(Span)
UnicodeTextFlow(Span, String)
UnexpectedCfgName((Symbol, Span), Option<(Symbol, Span)>)
UnexpectedCfgValue((Symbol, Span), Option<(Symbol, Span)>)
DeprecatedWhereclauseLocation(Span, Option<(Span, String)>)
SingleUseLifetime
Fields
param_span: SpanSpan of the parameter which declares this lifetime.
deletion_span: Option<Span>Span of the code that should be removed when eliding this lifetime. This span should include leading or trailing comma.
use_span: Option<(Span, bool)>Span of the single use, or None if the lifetime is never used. If true, the lifetime will be fully elided.
ident: IdentNamedArgumentUsedPositionally
Fields
position_sp_to_replace: Option<Span>Span where the named argument is used by position and will be replaced with the named argument name
position_sp_for_msg: Option<Span>Span where the named argument is used by position and is used for lint messages
named_arg_sp: SpanSpan where the named argument’s name is (so we know where to put the warning message)
AmbiguousGlobReexports
Fields
first_reexport_span: SpanSpan where the name is first re-exported.
duplicate_reexport_span: SpanSpan where the same name is also re-exported.
HiddenGlobReexports
Fields
glob_reexport_span: SpanThe glob reexport that is shadowed by the local binding.
private_item_span: SpanThe local binding that shadows the glob reexport.
UnusedQualifications
Fields
removal_span: SpanThe span of the unnecessarily-qualified path to remove.
AssociatedConstElidedLifetime
UnusedCrateDependency
IllFormedAttributeInput
Trait Implementations§
Auto Trait Implementations§
impl DynSend for BuiltinLintDiag
impl DynSync for BuiltinLintDiag
impl Freeze for BuiltinLintDiag
impl RefUnwindSafe for BuiltinLintDiag
impl Send for BuiltinLintDiag
impl Sync for BuiltinLintDiag
impl Unpin for BuiltinLintDiag
impl UnwindSafe for BuiltinLintDiag
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
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: 72 bytes
Size for each variant:
AbsPathWithModule: 16 bytesElidedLifetimesInPaths: 40 bytesUnusedImports: 72 bytesRedundantImport: 48 bytesDeprecatedMacro: 72 bytesPatternsInFnsWithoutBody: 32 bytesReservedPrefix: 40 bytesRawPrefix: 16 bytesReservedString: 20 bytesBreakWithLabelAndLoop: 16 bytesUnicodeTextFlow: 40 bytesUnexpectedCfgName: 32 bytesUnexpectedCfgValue: 32 bytesDeprecatedWhereclauseLocation: 48 bytesSingleUseLifetime: 52 bytesNamedArgumentUsedPositionally: 72 bytesAmbiguousGlobReexports: 72 bytesHiddenGlobReexports: 72 bytesUnusedQualifications: 16 bytesAssociatedConstElidedLifetime: 72 bytesUnusedCrateDependency: 16 bytesIllFormedAttributeInput: 48 bytes