pub enum BuiltinLintDiag {
Show 33 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,
},
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>,
},
PrivateExternCrateReexport {
source: Ident,
extern_crate_span: Span,
},
MacroIsPrivate(Ident),
UnusedMacroDefinition(Symbol),
MacroRuleNeverUsed(usize, Symbol),
UnstableFeature(DiagMessage),
UnusedCrateDependency {
extern_crate: Symbol,
local_crate: Symbol,
},
IllFormedAttributeInput {
suggestions: Vec<String>,
docs: Option<&'static str>,
},
OutOfScopeMacroCalls {
span: Span,
path: String,
location: String,
},
}
Variants§
AbsPathWithModule(Span)
ElidedLifetimesInPaths(usize, Span, bool, Span)
UnusedImports
Fields
RedundantImport(Vec<(Span, bool)>, Ident)
DeprecatedMacro
Fields
§
since_kind: DeprecatedSinceKind
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
§
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
ExternCrateNotIdiomatic
AmbiguousGlobImports
Fields
§
diag: AmbiguityErrorDiag
AmbiguousGlobReexports
Fields
HiddenGlobReexports
Fields
UnusedQualifications
UnsafeAttrOutsideUnsafe
AssociatedConstElidedLifetime
RedundantImportVisibility
UnknownDiagnosticAttribute
PrivateExternCrateReexport
MacroIsPrivate(Ident)
UnusedMacroDefinition(Symbol)
MacroRuleNeverUsed(usize, Symbol)
UnstableFeature(DiagMessage)
UnusedCrateDependency
IllFormedAttributeInput
OutOfScopeMacroCalls
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> 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<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: 200 bytes
Size for each variant:
AbsPathWithModule
: 16 bytesElidedLifetimesInPaths
: 40 bytesUnusedImports
: 80 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 bytesExternCrateNotIdiomatic
: 24 bytesAmbiguousGlobImports
: 200 bytesAmbiguousGlobReexports
: 72 bytesHiddenGlobReexports
: 72 bytesUnusedQualifications
: 16 bytesUnsafeAttrOutsideUnsafe
: 32 bytesAssociatedConstElidedLifetime
: 72 bytesRedundantImportVisibility
: 64 bytesUnknownDiagnosticAttribute
: 20 bytesPrivateExternCrateReexport
: 28 bytesMacroIsPrivate
: 20 bytesUnusedMacroDefinition
: 12 bytesMacroRuleNeverUsed
: 24 bytesUnstableFeature
: 56 bytesUnusedCrateDependency
: 16 bytesIllFormedAttributeInput
: 48 bytesOutOfScopeMacroCalls
: 64 bytes