mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 09:27:25 +00:00
Update trait_bounds.rs
This commit is contained in:
parent
b9788fef29
commit
cbd0135bd2
1 changed files with 6 additions and 6 deletions
|
@ -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::<Vec<_>>()
|
||||
.join(" + ");
|
||||
|
||||
if bounds.len() != fixed_traits.len() {
|
||||
let fixed_trait_snippet = fixed_traits
|
||||
.iter()
|
||||
.filter_map(|b| snippet_opt(cx, b.span))
|
||||
.collect::<Vec<_>>()
|
||||
.join(" + ");
|
||||
|
||||
span_lint_and_sugg(
|
||||
cx,
|
||||
TRAIT_DUPLICATION_IN_BOUNDS,
|
||||
|
|
Loading…
Reference in a new issue