-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Lint for unused type parameters on functions #9240
Labels
A-lint
Area: New lints
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What it does
Similar to
extra_unused_lifetimes
, checks for unused type parameters on functions and warns that this is likely unintended, suggesting that they be removed. (Note: should this only apply to functions, or are there other places it could be run?)Lint Name
extra_unused_type_parameters
Category
complexity
Advantage
pub
and isn't used elsewhere. This accidentally exposes downstream users to the author's mistake, which is bad news.Drawbacks
I can't think of any besides maybe the lint name, which might need some bikeshedding. Also, maybe a
extra_unused_generics
lint could be introduced that implies bothextra_unused_lifetimes
andextra_unused_type_params
?Example
Could be written as:
The text was updated successfully, but these errors were encountered: