mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-02 10:55:13 +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<'_>) {
|
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 New Issue
Block a user