Enum rustc_lint_defs::BuiltinLintDiag

source ·
pub enum BuiltinLintDiag {
Show 61 variants AbsPathWithModule(Span), ProcMacroDeriveResolutionFallback { span: Span, ns: Namespace, ident: Ident, }, MacroExpandedMacroExportsAccessedByAbsolutePaths(Span), ElidedLifetimesInPaths(usize, Span, bool, Span), 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, Abi), 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), 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, CrateTypeInCfgAttr, CrateNameInCfgAttr, 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, },
}

Variants§

§

AbsPathWithModule(Span)

§

ProcMacroDeriveResolutionFallback

Fields

§span: Span
§ns: Namespace
§ident: Ident
§

MacroExpandedMacroExportsAccessedByAbsolutePaths(Span)

§

ElidedLifetimesInPaths(usize, Span, bool, Span)

§

UnknownCrateTypes

Fields

§span: Span
§candidate: Option<Symbol>
§

UnusedImports

Fields

§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

Fields

§suggestion: Option<Symbol>
§suggestion_span: Span
§path: String
§

MissingAbi(Span, Abi)

§

UnusedDocComment(Span)

§

UnusedBuiltinAttribute

Fields

§attr_name: Symbol
§macro_name: String
§invoc_span: Span
§

PatternsInFnsWithoutBody

Fields

§span: Span
§ident: Ident
§is_foreign: bool
§

LegacyDeriveHelpers(Span)

§

OrPatternsBackCompat(Span, String)

§

ReservedPrefix(Span, String)

§

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

Fields

§suggestion: Span
§

SingleUseLifetime

Fields

§param_span: Span

Span 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: Ident
§

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

§named_arg_sp: Span

Span where the named argument’s name is (so we know where to put the warning message)

§named_arg_name: String

String containing the named arguments name

§is_formatting_arg: bool

Indicates if the named argument is used as a width/precision for formatting

§

ByteSliceInPackedStructWithDerive

Fields

§

UnusedExternCrate

Fields

§removal_span: Span
§

ExternCrateNotIdiomatic

Fields

§vis_span: Span
§ident_span: Span
§

AmbiguousGlobImports

§

AmbiguousGlobReexports

Fields

§name: String

The name for which collision(s) have occurred.

§namespace: String

The name space for which the collision(s) occurred in.

§first_reexport_span: Span

Span where the name is first re-exported.

§duplicate_reexport_span: Span

Span where the same name is also re-exported.

§

HiddenGlobReexports

Fields

§name: String

The name of the local binding which shadows the glob re-export.

§namespace: String

The namespace for which the shadowing occurred in.

§glob_reexport_span: Span

The glob reexport that is shadowed by the local binding.

§private_item_span: Span

The local binding that shadows the glob reexport.

§

UnusedQualifications

Fields

§removal_span: Span

The span of the unnecessarily-qualified path to remove.

§

UnsafeAttrOutsideUnsafe

Fields

§attribute_name_span: Span
§sugg_spans: (Span, Span)
§

AssociatedConstElidedLifetime

Fields

§elided: bool
§span: Span
§lifetimes_in_scope: MultiSpan
§

RedundantImportVisibility

Fields

§span: Span
§max_vis: String
§import_vis: String
§

UnknownDiagnosticAttribute

Fields

§span: Span
§typo_name: Option<Symbol>
§

MacroUseDeprecated

§

UnusedMacroUse

§

PrivateExternCrateReexport

Fields

§source: Ident
§extern_crate_span: Span
§

UnusedLabel

§

MacroIsPrivate(Ident)

§

UnusedMacroDefinition(Symbol)

§

MacroRuleNeverUsed(usize, Symbol)

§

UnstableFeature(DiagMessage)

§

AvoidUsingIntelSyntax

§

AvoidUsingAttSyntax

§

IncompleteInclude

§

UnnameableTestItems

§

DuplicateMacroAttribute

§

CfgAttrNoAttributes

§

CrateTypeInCfgAttr

§

CrateNameInCfgAttr

§

MissingFragmentSpecifier

§

MetaVariableStillRepeating(MacroRulesNormalizedIdent)

§

MetaVariableWrongOperator

§

DuplicateMatcherBinding

§

UnknownMacroVariable(MacroRulesNormalizedIdent)

§

UnusedCrateDependency

Fields

§extern_crate: Symbol
§local_crate: Symbol
§

WasmCAbi

§

IllFormedAttributeInput

Fields

§suggestions: Vec<String>
§

InnerAttributeUnstable

Fields

§is_macro: bool
§

OutOfScopeMacroCalls

Fields

§path: String

Trait Implementations§

source§

impl Debug for BuiltinLintDiag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Aligned for T

source§

const ALIGN: Alignment = _

Alignment of Self.
source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Filterable for T

source§

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<'a, T> Captures<'a> for T
where T: ?Sized,

source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T
where T: Send + Sync,

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 bytes
  • ProcMacroDeriveResolutionFallback: 32 bytes
  • MacroExpandedMacroExportsAccessedByAbsolutePaths: 16 bytes
  • ElidedLifetimesInPaths: 40 bytes
  • UnknownCrateTypes: 20 bytes
  • UnusedImports: 80 bytes
  • RedundantImport: 48 bytes
  • DeprecatedMacro: 72 bytes
  • MissingAbi: 20 bytes
  • UnusedDocComment: 16 bytes
  • UnusedBuiltinAttribute: 48 bytes
  • PatternsInFnsWithoutBody: 32 bytes
  • LegacyDeriveHelpers: 16 bytes
  • OrPatternsBackCompat: 40 bytes
  • ReservedPrefix: 40 bytes
  • TrailingMacro: 24 bytes
  • BreakWithLabelAndLoop: 16 bytes
  • UnicodeTextFlow: 40 bytes
  • UnexpectedCfgName: 32 bytes
  • UnexpectedCfgValue: 32 bytes
  • DeprecatedWhereclauseLocation: 48 bytes
  • MissingUnsafeOnExtern: 16 bytes
  • SingleUseLifetime: 52 bytes
  • NamedArgumentUsedPositionally: 72 bytes
  • ByteSliceInPackedStructWithDerive: 32 bytes
  • UnusedExternCrate: 16 bytes
  • ExternCrateNotIdiomatic: 24 bytes
  • AmbiguousGlobImports: 200 bytes
  • AmbiguousGlobReexports: 72 bytes
  • HiddenGlobReexports: 72 bytes
  • UnusedQualifications: 16 bytes
  • UnsafeAttrOutsideUnsafe: 32 bytes
  • AssociatedConstElidedLifetime: 72 bytes
  • RedundantImportVisibility: 64 bytes
  • UnknownDiagnosticAttribute: 20 bytes
  • MacroUseDeprecated: 0 bytes
  • UnusedMacroUse: 0 bytes
  • PrivateExternCrateReexport: 28 bytes
  • UnusedLabel: 0 bytes
  • MacroIsPrivate: 20 bytes
  • UnusedMacroDefinition: 12 bytes
  • MacroRuleNeverUsed: 24 bytes
  • UnstableFeature: 56 bytes
  • AvoidUsingIntelSyntax: 0 bytes
  • AvoidUsingAttSyntax: 0 bytes
  • IncompleteInclude: 0 bytes
  • UnnameableTestItems: 0 bytes
  • DuplicateMacroAttribute: 0 bytes
  • CfgAttrNoAttributes: 0 bytes
  • CrateTypeInCfgAttr: 0 bytes
  • CrateNameInCfgAttr: 0 bytes
  • MissingFragmentSpecifier: 0 bytes
  • MetaVariableStillRepeating: 20 bytes
  • MetaVariableWrongOperator: 0 bytes
  • DuplicateMatcherBinding: 0 bytes
  • UnknownMacroVariable: 20 bytes
  • UnusedCrateDependency: 16 bytes
  • WasmCAbi: 0 bytes
  • IllFormedAttributeInput: 32 bytes
  • InnerAttributeUnstable: 9 bytes
  • OutOfScopeMacroCalls: 32 bytes