-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Wired false negative of clippy::extra_unused_type_parameters
#12820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The lint intentionally does not warn on empty functions since it's often used to statically assert that a type satisfies some bounds: #10319 |
@y21 thanks for the context! |
@y21 I agree with not warning on empty functions that have some bounds |
In this case there's still an implicit This tests that I'm not sure how common assertions (with no bounds) like that are though. If it's very rare and prevents a lot of true positives, it might be worth accepting those assertions as a false positive and emitting a warning anyway and just requiring people to add an |
@y21 Oh, I was just experimenting, so I think it's Okay ;) |
Summary
For the following code:
We can get:
But no warning after removing the unneeded unit expression in
foo
.Lint Name
extra_unused_type_parameters
Reproducer
I tried this code:
I expected to see this happen:
Instead, nothing happened.
Version
The text was updated successfully, but these errors were encountered: