We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9788fe commit cbd0135Copy full SHA for cbd0135
clippy_lints/src/trait_bounds.rs
@@ -206,13 +206,13 @@ impl<'tcx> LateLintPass<'tcx> for TraitBounds {
206
}
207
208
209
- let fixed_trait_snippet = fixed_traits
210
- .iter()
211
- .filter_map(|b| snippet_opt(cx, b.span))
212
- .collect::<Vec<_>>()
213
- .join(" + ");
214
-
215
if bounds.len() != fixed_traits.len() {
+ let fixed_trait_snippet = fixed_traits
+ .iter()
+ .filter_map(|b| snippet_opt(cx, b.span))
+ .collect::<Vec<_>>()
+ .join(" + ");
+
216
span_lint_and_sugg(
217
cx,
218
TRAIT_DUPLICATION_IN_BOUNDS,
0 commit comments