forked from rust-lang/rust-clippy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#8703 - aldhsu:add_repeated_where_clause_or_tr…
…ait_bound, r=flip1995 Add `repeated_where_clause_or_trait_bound` lint I thought I would try and scratch my own itch for rust-lang#8674. 1. Is comparing the `Res` the correct way for ensuring we have the same trait? 2. Is there a way to get the spans for the bounds and clauses for suggestions? I tried to use `GenericParam::bounds_span_for_suggestions` but it only gave me an empty span at the end of the spans. I tried `WhereClause::span_for_predicates_or_empty_place` and it included the comma. 3. Is there a simpler way to get the trait names? I have used the spans of the traits because I didn't see a way to get it off the `Res` or `Def`. changelog: Add ``[`repeated_where_clause_or_trait_bound`]`` lint.
- Loading branch information
Showing
4 changed files
with
340 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.