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_accesslint detects accessing options by field instead of the wrapper function. - The
default_hash_typelint detects use ofstd::collections::HashMapandstd::collections::HashSet, suggesting the use ofFxHashMap/FxHashSet. - The
diagnostic_outside_of_impllint detects calls to functions annotated with#[rustc_lint_diagnostics]that are outside anDiagnostic,Subdiagnostic, orLintDiagnosticimpl (either hand-written or derived). - The
existing_doc_keywordlint detects use#[doc()]keywords that donβt exist, e.g.#[doc(keyword = "..")]. - The
lint_pass_impl_without_macrodetects manual implementations of a lint pass, without usingdeclare_lint_passor [impl_lint_pass]. - The
non_glob_import_of_type_ir_inherent_itemlint detects non-glob imports of modulerustc_type_ir::inherent. - The
potential_query_instabilitylint detects use of methods which can lead to potential query instability, such as iterating over aHashMap. - The
untracked_query_informationlint 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. - The
untranslatable_diagnosticlint detects messages passed to functions withimpl Into<{D,Subd}iagMessageparameters without using translatable Fluent strings. - The
usage_of_qualified_tylint detects usages ofty::TyKind, whereTyshould be used instead. - The
usage_of_type_ir_inherentlint detects usagerustc_type_ir::inherent. - The
usage_of_ty_tykindlint detects usages ofty::TyKind::<kind>, wherety::<kind>would suffice.
FunctionsΒ§
- gen_
args π - is_
doc_ πkeyword - is_
span_ πctxt_ call - is_
ty_ πor_ ty_ ctxt - lint_
ty_ πkind_ usage - Helper function for lints that check for expressions with calls and use typeck results to get the
DefIdandGenericArgsRefof the function.