From cbd0135bd2d2e546ca4c2c2147798d1f7c547128 Mon Sep 17 00:00:00 2001 From: John Kelly Date: Tue, 2 May 2023 18:15:02 +0100 Subject: [PATCH] Update trait_bounds.rs --- clippy_lints/src/trait_bounds.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clippy_lints/src/trait_bounds.rs b/clippy_lints/src/trait_bounds.rs index 8de0f92109b..ac61fb157b4 100644 --- a/clippy_lints/src/trait_bounds.rs +++ b/clippy_lints/src/trait_bounds.rs @@ -206,13 +206,13 @@ impl<'tcx> LateLintPass<'tcx> for TraitBounds { } } - let fixed_trait_snippet = fixed_traits - .iter() - .filter_map(|b| snippet_opt(cx, b.span)) - .collect::>() - .join(" + "); - if bounds.len() != fixed_traits.len() { + let fixed_trait_snippet = fixed_traits + .iter() + .filter_map(|b| snippet_opt(cx, b.span)) + .collect::>() + .join(" + "); + span_lint_and_sugg( cx, TRAIT_DUPLICATION_IN_BOUNDS,