Use span_lint_hir()
for more intuitive #[allow(...)]
locations
#132
Labels
A-Linter
Related to the linter and custom lints
C-Usability
An improvement that makes the API more pleasant
Milestone
span_lint_hir()
can be used to emit a diagnostic for a differentHirId
, meaning a different location that can be silenced.This is useful when we check one location for a lint, but emit the diagnostic in a separate location. The user may try
#[allow(...)]
-ing the lint at that separate location, but nothing will happen. Usingspan_lint_hir()
can avoid this scenario.The text was updated successfully, but these errors were encountered: