Check if clippy::used_underscore_binding
is allowed on the underscore field
#11520
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
Description
It would be cool, if the clippy::used_underscore_binding lint would also check the lint level at the field itself. This would make it simple to allow the lint, if it's used by a derive macro
Example
Hints:
The lint level at a given note, can be checked with TyCtxt::lint_level_at_node accessed via
cx.tcx.lint_level_at_node
with the HirId of the field. If the level isLevel::Expect
, the expectation should be marked as fulfilled by callingLateContext::fulfill_expectation
Version
Additional Information
Context: idanarye/rust-typed-builder#113
The text was updated successfully, but these errors were encountered: