Skip to content

Commit e521c67

Browse files
committed
early return on empty parameters/where clause
1 parent 2b7fde6 commit e521c67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/trait_bounds.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl TraitBounds {
148148
}
149149

150150
fn check_trait_bound_duplication(cx: &LateContext<'_>, gen: &'_ Generics<'_>) {
151-
if in_macro(gen.span) {
151+
if in_macro(gen.span) || gen.params.is_empty() || gen.where_clause.predicates.is_empty() {
152152
return;
153153
}
154154

0 commit comments

Comments
 (0)