pub enum BuiltinLintDiag {
Show 63 variants
AbsPathWithModule(Span),
ProcMacroDeriveResolutionFallback {
span: Span,
ns: Namespace,
ident: Ident,
},
MacroExpandedMacroExportsAccessedByAbsolutePaths(Span),
ElidedLifetimesInPaths(usize, Span, bool, Span),
ElidedNamedLifetimes {
elided: (Span, MissingLifetimeKind),
resolution: ElidedLifetimeResolution,
},
UnknownCrateTypes {
span: Span,
candidate: Option<Symbol>,
},
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,
},
MissingAbi(Span, ExternAbi),
UnusedDocComment(Span),
UnusedBuiltinAttribute {
attr_name: Symbol,
macro_name: String,
invoc_span: Span,
},
PatternsInFnsWithoutBody {
span: Span,
ident: Ident,
is_foreign: bool,
},
LegacyDeriveHelpers(Span),
OrPatternsBackCompat(Span, String),
ReservedPrefix(Span, String),
RawPrefix(Span),
ReservedString {
is_string: bool,
suggestion: Span,
},
TrailingMacro(bool, Ident),
BreakWithLabelAndLoop(Span),
UnicodeTextFlow(Span, String),
UnexpectedCfgName((Symbol, Span), Option<(Symbol, Span)>),
UnexpectedCfgValue((Symbol, Span), Option<(Symbol, Span)>),
DeprecatedWhereclauseLocation(Span, Option<(Span, String)>),
MissingUnsafeOnExtern {
suggestion: Span,
},
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,
},
ByteSliceInPackedStructWithDerive {
ty: String,
},
UnusedExternCrate {
removal_span: Span,
},
ExternCrateNotIdiomatic {
vis_span: Span,
ident_span: Span,
},
AmbiguousGlobImports {
diag: AmbiguityErrorDiag,
},
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,
},
UnsafeAttrOutsideUnsafe {
attribute_name_span: Span,
sugg_spans: (Span, Span),
},
AssociatedConstElidedLifetime {
elided: bool,
span: Span,
lifetimes_in_scope: MultiSpan,
},
RedundantImportVisibility {
span: Span,
max_vis: String,
import_vis: String,
},
UnknownDiagnosticAttribute {
span: Span,
typo_name: Option<Symbol>,
},
MacroUseDeprecated,
UnusedMacroUse,
PrivateExternCrateReexport {
source: Ident,
extern_crate_span: Span,
},
UnusedLabel,
MacroIsPrivate(Ident),
UnusedMacroDefinition(Symbol),
MacroRuleNeverUsed(usize, Symbol),
UnstableFeature(DiagMessage),
AvoidUsingIntelSyntax,
AvoidUsingAttSyntax,
IncompleteInclude,
UnnameableTestItems,
DuplicateMacroAttribute,
CfgAttrNoAttributes,
MissingFragmentSpecifier,
MetaVariableStillRepeating(MacroRulesNormalizedIdent),
MetaVariableWrongOperator,
DuplicateMatcherBinding,
UnknownMacroVariable(MacroRulesNormalizedIdent),
UnusedCrateDependency {
extern_crate: Symbol,
local_crate: Symbol,
},
WasmCAbi,
IllFormedAttributeInput {
suggestions: Vec<String>,
},
InnerAttributeUnstable {
is_macro: bool,
},
OutOfScopeMacroCalls {
path: String,
},
UnexpectedBuiltinCfg {
cfg: String,
cfg_name: Symbol,
controlled_by: &'static str,
},
}
Variants§
AbsPathWithModule(Span)
ProcMacroDeriveResolutionFallback
MacroExpandedMacroExportsAccessedByAbsolutePaths(Span)
ElidedLifetimesInPaths(usize, Span, bool, Span)
ElidedNamedLifetimes
UnknownCrateTypes
UnusedImports
Fields
RedundantImport(Vec<(Span, bool)>, Ident)
DeprecatedMacro
Fields
§
since_kind: DeprecatedSinceKind
MissingAbi(Span, ExternAbi)
UnusedDocComment(Span)
UnusedBuiltinAttribute
PatternsInFnsWithoutBody
LegacyDeriveHelpers(Span)
OrPatternsBackCompat(Span, String)
ReservedPrefix(Span, String)
RawPrefix(Span)
'r#
in edition < 2021.
ReservedString
##
or #"
in edition < 2024.
TrailingMacro(bool, Ident)
BreakWithLabelAndLoop(Span)
UnicodeTextFlow(Span, String)
UnexpectedCfgName((Symbol, Span), Option<(Symbol, Span)>)
UnexpectedCfgValue((Symbol, Span), Option<(Symbol, Span)>)
DeprecatedWhereclauseLocation(Span, Option<(Span, String)>)
MissingUnsafeOnExtern
SingleUseLifetime
Fields
§
deletion_span: Option<Span>
Span of the code that should be removed when eliding this lifetime. This span should include leading or trailing comma.
NamedArgumentUsedPositionally
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
ByteSliceInPackedStructWithDerive
UnusedExternCrate
ExternCrateNotIdiomatic
AmbiguousGlobImports
Fields
§
diag: AmbiguityErrorDiag
AmbiguousGlobReexports
Fields
HiddenGlobReexports
Fields
UnusedQualifications
UnsafeAttrOutsideUnsafe
AssociatedConstElidedLifetime
RedundantImportVisibility
UnknownDiagnosticAttribute
MacroUseDeprecated
UnusedMacroUse
PrivateExternCrateReexport
UnusedLabel
MacroIsPrivate(Ident)
UnusedMacroDefinition(Symbol)
MacroRuleNeverUsed(usize, Symbol)
UnstableFeature(DiagMessage)
AvoidUsingIntelSyntax
AvoidUsingAttSyntax
IncompleteInclude
UnnameableTestItems
DuplicateMacroAttribute
CfgAttrNoAttributes
MissingFragmentSpecifier
MetaVariableStillRepeating(MacroRulesNormalizedIdent)
MetaVariableWrongOperator
DuplicateMatcherBinding
UnknownMacroVariable(MacroRulesNormalizedIdent)
UnusedCrateDependency
WasmCAbi
IllFormedAttributeInput
InnerAttributeUnstable
OutOfScopeMacroCalls
UnexpectedBuiltinCfg
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
Mutably borrows from an owned value. Read more
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
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>
Converts
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>
Converts
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<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
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: 200 bytes
Size for each variant:
AbsPathWithModule
: 16 bytesProcMacroDeriveResolutionFallback
: 32 bytesMacroExpandedMacroExportsAccessedByAbsolutePaths
: 16 bytesElidedLifetimesInPaths
: 40 bytesElidedNamedLifetimes
: 32 bytesUnknownCrateTypes
: 20 bytesUnusedImports
: 80 bytesRedundantImport
: 48 bytesDeprecatedMacro
: 72 bytesMissingAbi
: 20 bytesUnusedDocComment
: 16 bytesUnusedBuiltinAttribute
: 48 bytesPatternsInFnsWithoutBody
: 32 bytesLegacyDeriveHelpers
: 16 bytesOrPatternsBackCompat
: 40 bytesReservedPrefix
: 40 bytesRawPrefix
: 16 bytesReservedString
: 20 bytesTrailingMacro
: 24 bytesBreakWithLabelAndLoop
: 16 bytesUnicodeTextFlow
: 40 bytesUnexpectedCfgName
: 32 bytesUnexpectedCfgValue
: 32 bytesDeprecatedWhereclauseLocation
: 48 bytesMissingUnsafeOnExtern
: 16 bytesSingleUseLifetime
: 52 bytesNamedArgumentUsedPositionally
: 72 bytesByteSliceInPackedStructWithDerive
: 32 bytesUnusedExternCrate
: 16 bytesExternCrateNotIdiomatic
: 24 bytesAmbiguousGlobImports
: 200 bytesAmbiguousGlobReexports
: 72 bytesHiddenGlobReexports
: 72 bytesUnusedQualifications
: 16 bytesUnsafeAttrOutsideUnsafe
: 32 bytesAssociatedConstElidedLifetime
: 72 bytesRedundantImportVisibility
: 64 bytesUnknownDiagnosticAttribute
: 20 bytesMacroUseDeprecated
: 0 bytesUnusedMacroUse
: 0 bytesPrivateExternCrateReexport
: 28 bytesUnusedLabel
: 0 bytesMacroIsPrivate
: 20 bytesUnusedMacroDefinition
: 12 bytesMacroRuleNeverUsed
: 24 bytesUnstableFeature
: 56 bytesAvoidUsingIntelSyntax
: 0 bytesAvoidUsingAttSyntax
: 0 bytesIncompleteInclude
: 0 bytesUnnameableTestItems
: 0 bytesDuplicateMacroAttribute
: 0 bytesCfgAttrNoAttributes
: 0 bytesMissingFragmentSpecifier
: 0 bytesMetaVariableStillRepeating
: 20 bytesMetaVariableWrongOperator
: 0 bytesDuplicateMatcherBinding
: 0 bytesUnknownMacroVariable
: 20 bytesUnusedCrateDependency
: 16 bytesWasmCAbi
: 0 bytesIllFormedAttributeInput
: 32 bytesInnerAttributeUnstable
: 9 bytesOutOfScopeMacroCalls
: 32 bytesUnexpectedBuiltinCfg
: 56 bytes