Closed
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!()
}