rustc_lint

Module 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 of std::collections::HashMap and std::collections::HashSet, suggesting the use of FxHashMap/FxHashSet.
  • The diagnostic_outside_of_impl lint detects calls to functions annotated with #[rustc_lint_diagnostics] that are outside an Diagnostic, Subdiagnostic, or LintDiagnostic impl (either hand-written or derived).
  • 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 using [declare_lint_pass] or [impl_lint_pass].
  • The non_glob_import_of_type_ir_inherent_item lint detects non-glob imports of module rustc_type_ir::inherent.
  • The potential_query_instability lint detects use of methods which can lead to potential query instability, such as iterating over a HashMap.
  • The untracked_query_information lint detects use of methods which leak information not tracked by the query system, such as whether a Steal<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_diagnostic lint detects messages passed to functions with impl Into<{D,Subd}iagMessage parameters without using translatable Fluent strings.
  • The usage_of_qualified_ty lint detects usages of ty::TyKind, where Ty should be used instead.
  • The usage_of_type_ir_inherent lint detects usage rustc_type_ir::inherent.
  • The usage_of_ty_tykind lint detects usages of ty::TyKind::<kind>, where ty::<kind> would suffice.

Functions§