mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-11 22:02:55 +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<'_>) {
|
||||
if in_macro(gen.span) {
|
||||
if in_macro(gen.span) || gen.params.is_empty() || gen.where_clause.predicates.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue