Skip to content

Commit

Permalink
early return on empty parameters/where clause
Browse files Browse the repository at this point in the history
  • Loading branch information
wiomoc committed Aug 3, 2020
1 parent 2b7fde6 commit e521c67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/trait_bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e521c67

Please sign in to comment.