mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-13 14:52:46 +00:00
early return on empty parameters/where clause
This commit is contained in:
parent
2b7fde6a4b
commit
e521c67e5f
1 changed files with 1 additions and 1 deletions
|
@ -148,7 +148,7 @@ impl TraitBounds {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn check_trait_bound_duplication(cx: &LateContext<'_>, gen: &'_ Generics<'_>) {
|
fn check_trait_bound_duplication(cx: &LateContext<'_>, gen: &'_ Generics<'_>) {
|
||||||
if in_macro(gen.span) {
|
if in_macro(gen.span) || gen.params.is_empty() || gen.where_clause.predicates.is_empty() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue