Module rustc_lint::internal
source · Expand description
Some lints that are only useful in the compiler or crates that use compiler internals, such as Clippy.
Structs
Statics
- The
bad_opt_access
lint detects accessing options by field instead of the wrapper function. - The
default_hash_type
lint detects use ofstd::collections::HashMap
/std::collections::HashSet
, suggesting the use ofFxHashMap
/FxHashSet
. - The
diagnostic_outside_of_impl
lint detects diagnostics created manually, and inside anIntoDiagnostic
/AddToDiagnostic
implementation, or a#[derive(Diagnostic)]
/#[derive(Subdiagnostic)]
expansion. - The
existing_doc_keyword
lint detects use#[doc()]
keywords that don’t exist, e.g.#[doc(keyword = "..")]
. - The
lint_pass_impl_without_macro
detects manual implementations of a lint pass, without usingdeclare_lint_pass
orimpl_lint_pass
. - The
potential_query_instability
lint detects use of methods which can lead to potential query instability, such as iterating over aHashMap
. - The
untranslatable_diagnostic
lint detects diagnostics created without using translatable Fluent strings. - The
untranslatable_diagnostic_trivial
lint detects diagnostics created using only static strings. - The
usage_of_qualified_ty
lint detects usages ofty::TyKind
, whereTy
should be used instead. - The
usage_of_ty_tykind
lint detects usages ofty::TyKind::<kind>
, wherety::<kind>
would suffice.
Functions
- gen_args 🔒
- Helper function for lints that check for expressions with calls and use typeck results to get the
DefId
andGenericArgsRef
of the function.