Expand description
Some lints that are only useful in the compiler or crates that use compiler internals, such as Clippy.
Structsยง
- BadOpt
Access - Default
Hash Types - Diagnostics
- Lint
Pass Impl - Query
Stability - Span
UseEq Ctxt - Symbol
Intern String Literal - TyTy
Kind - TypeIr
Staticsยง
- BAD_
OPT_ ACCESS - The
bad_opt_access
lint detects accessing options by field instead of the wrapper function. - DEFAULT_
HASH_ TYPES - The
default_hash_type
lint detects use ofstd::collections::HashMap
andstd::collections::HashSet
, suggesting the use ofFxHashMap
/FxHashSet
. - DIAGNOSTIC_
OUTSIDE_ OF_ IMPL - The
diagnostic_outside_of_impl
lint detects calls to functions annotated with#[rustc_lint_diagnostics]
that are outside anDiagnostic
,Subdiagnostic
, orLintDiagnostic
impl (either hand-written or derived). - LINT_
PASS_ IMPL_ WITHOUT_ MACRO - The
lint_pass_impl_without_macro
detects manual implementations of a lint pass, without usingdeclare_lint_pass
or [impl_lint_pass
]. - NON_
GLOB_ IMPORT_ OF_ TYPE_ IR_ INHERENT - The
non_glob_import_of_type_ir_inherent_item
lint detects non-glob imports of modulerustc_type_ir::inherent
. - POTENTIAL_
QUERY_ INSTABILITY - The
potential_query_instability
lint detects use of methods which can lead to potential query instability, such as iterating over aHashMap
. - SPAN_
USE_ EQ_ CTXT - SYMBOL_
INTERN_ STRING_ LITERAL - The
symbol_intern_string_literal
detectsSymbol::intern
being called on a string literal - UNTRACKED_
QUERY_ INFORMATION - The
untracked_query_information
lint detects use of methods which leak information not tracked by the query system, such as whether aSteal<T>
value has already been stolen. In order not to break incremental compilation, such methods must be used very carefully or not at all. - UNTRANSLATABLE_
DIAGNOSTIC - The
untranslatable_diagnostic
lint detects messages passed to functions withimpl Into<{D,Subd}iagMessage
parameters without using translatable Fluent strings. - USAGE_
OF_ QUALIFIED_ TY - The
usage_of_qualified_ty
lint detects usages ofty::TyKind
, whereTy
should be used instead. - USAGE_
OF_ TYPE_ IR_ INHERENT - The
usage_of_type_ir_inherent
lint detects usagerustc_type_ir::inherent
. - USAGE_
OF_ TY_ TYKIND - The
usage_of_ty_tykind
lint detects usages ofty::TyKind::<kind>
, wherety::<kind>
would suffice.
Functionsยง
- gen_
args ๐ - is_
span_ ๐ctxt_ call - is_
ty_ ๐or_ ty_ ctxt - lint_
ty_ ๐kind_ usage - typeck_
results_ ๐of_ method_ fn - Helper function for lints that check for expressions with calls and use typeck results to
get the
DefId
andGenericArgsRef
of the function.