Expand description
Clippy wrappers around rustc’s diagnostic functions.
These functions are used by the INTERNAL_METADATA_COLLECTOR
lint to collect the corresponding
lint applicability. Please make sure that you update the LINT_EMISSION_FUNCTIONS
variable in
clippy_lints::utils::internal_lints::metadata_collector
when a new function is added
or renamed.
Thank you!
~The INTERNAL_METADATA_COLLECTOR
lint
Functions§
- docs_
link 🔒 - span_
lint - Emit a basic lint message with a
msg
and aspan
. - span_
lint_ and_ help - Same as
span_lint
but with an extrahelp
message. - span_
lint_ and_ note - Like
span_lint
but with anote
section instead of ahelp
message. - span_
lint_ and_ sugg - Add a span lint with a suggestion on how to fix it.
- span_
lint_ and_ then - Like
span_lint
but allows to add notes, help and suggestions using a closure. - span_
lint_ hir - Like
span_lint
, but emits the lint at the node identified by the givenHirId
. - span_
lint_ hir_ and_ then - Like
span_lint_and_then
, but emits the lint at the node identified by the givenHirId
. - validate_
diag 🔒 - Makes sure that a diagnostic is well formed.