-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-lintArea: New lintsArea: New lintsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
What it does
Checks for cases where generics are being used and multiple syntax specifications for trait bounds are used simultaneously.
Categories
- Kind:
clippy::style
,clippy::pedantic
Drawbacks
Perhaps there are contexts where this communicates information clearer?
Example
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!()
}
or
fn func(arg: impl Clone + Default) {
todo!()
}
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy