mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-30 17:34:54 +00:00
early return on empty parameters/where clause
This commit is contained in:
parent
2b7fde6a4b
commit
e521c67e5f
@ -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 New Issue
Block a user