We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Checks for cases where generics are being used and multiple syntax specifications for trait bounds are used simultaneously.
clippy::style
clippy::pedantic
Perhaps there are contexts where this communicates information clearer?
fn func<T: Clone + Default>(arg: T) where T: Clone + Default, { todo!() }
Could be written as:
fn func<T: Clone + Default>(arg: T) { todo!() }
or
fn func<T>(arg: T) where T: Clone + Default, { todo!() }
fn func(arg: impl Clone + Default) { todo!() }
The text was updated successfully, but these errors were encountered:
Lint duplicate methods of trait bounds
841dab7
Fixes rust-lang#5777
48900a2
Auto merge of #5852 - wiomoc:feature/lint-duplicate-trait, r=Manishearth
b3b7ed0
Add lint for duplicate methods of trait bounds rel: #5777 changelog: Add [`trait_duplication_in_bounds`] lint
Rollup merge of rust-lang#5852 - wiomoc:feature/lint-duplicate-trait,…
3e89f05
… r=Manishearth Add lint for duplicate methods of trait bounds rel: rust-lang#5777 changelog: Add [`trait_duplication_in_bounds`] lint
84455b2
94c50bc
No branches or pull requests
What it does
Checks for cases where generics are being used and multiple syntax specifications for trait bounds are used simultaneously.
Categories
clippy::style
,clippy::pedantic
Drawbacks
Perhaps there are contexts where this communicates information clearer?
Example
Could be written as:
or
or
The text was updated successfully, but these errors were encountered: