Should ignored-unit-patterns include parameter destructuring #11403
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
error: matching over
()
is more explicit--> src/lib.rs:8:12
|
8 | pub fn moo(_: ()) {}
| ^ help: use
()
instead of_
:()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ignored_unit_patterns
= note:
-D clippy::ignored-unit-patterns
implied by-D clippy::pedantic
Lint Name
ignored_unit_patterns
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
It's unclear from #11242 and the test cases if this check was intended to include parameter destructuring.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: