Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lint for duplicate methods of trait bounds #5852

Merged
merged 3 commits into from
Aug 4, 2020

Conversation

wiomoc
Copy link
Contributor

@wiomoc wiomoc commented Jul 28, 2020

rel: #5777

changelog: Add [trait_duplication_in_bounds] lint

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 28, 2020
@wiomoc wiomoc force-pushed the feature/lint-duplicate-trait branch from 841dab7 to 48900a2 Compare July 28, 2020 14:32
@wiomoc wiomoc force-pushed the feature/lint-duplicate-trait branch from 48900a2 to 94c50bc Compare July 28, 2020 14:42
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the delay!

clippy_lints/src/trait_bounds.rs Show resolved Hide resolved
@flip1995
Copy link
Member

flip1995 commented Aug 3, 2020

A nice thing to do here would be to add a suggestion, that can auto-remove those bounds. But this involves some effort, so it should can be done in another PR.

@flip1995 flip1995 added S-waiting-on-bors Status: The marked PR was approved and is only waiting bors and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Aug 3, 2020
@Manishearth
Copy link
Member

@bors r+

@flip1995 yeah i was going to suggest this, unfortunately suggestions removing a bound require some weird spans where you include one of the + operators, and it's icky.

@bors
Copy link
Collaborator

bors commented Aug 3, 2020

📌 Commit e521c67 has been approved by Manishearth

@bors
Copy link
Collaborator

bors commented Aug 3, 2020

⌛ Testing commit e521c67 with merge b3b7ed0...

bors added a commit that referenced this pull request Aug 3, 2020
Add lint for duplicate methods of trait bounds

rel: #5777

changelog: Add [`trait_duplication_in_bounds`] lint
@bors
Copy link
Collaborator

bors commented Aug 3, 2020

💔 Test failed - checks-action_test

@flip1995
Copy link
Member

flip1995 commented Aug 3, 2020

Yeah, I would probably do this by modifying the ast and pretty printing it

@flip1995
Copy link
Member

flip1995 commented Aug 3, 2020

Blocked on #5864

@flip1995
Copy link
Member

flip1995 commented Aug 4, 2020

@bors r=Manishearth rollup=always

@bors
Copy link
Collaborator

bors commented Aug 4, 2020

💡 This pull request was already approved, no need to approve it again.

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.
  • There's another pull request that is currently being tested, blocking this pull request: Remove old Symbol reexport #5856

@bors
Copy link
Collaborator

bors commented Aug 4, 2020

📌 Commit e521c67 has been approved by Manishearth

flip1995 added a commit to flip1995/rust-clippy that referenced this pull request Aug 4, 2020
… r=Manishearth

Add lint for duplicate methods of trait bounds

rel: rust-lang#5777

changelog: Add [`trait_duplication_in_bounds`] lint
bors added a commit that referenced this pull request Aug 4, 2020
Rollup of 6 pull requests

Successful merges:

 - #5725 (should_impl_trait - ignore methods with lifetime params)
 - #5837 (needless_collect: catch x: Vec<_> = iter.collect(); x.into_iter() ...)
 - #5846 (Handle mapping to Option in `map_flatten` lint)
 - #5848 (Add derive_ord_xor_partial_ord lint)
 - #5852 (Add lint for duplicate methods of trait bounds)
 - #5856 (Remove old Symbol reexport)

Failed merges:

r? @ghost

changelog: rollup
bors added a commit that referenced this pull request Aug 4, 2020
Rollup of 6 pull requests

Successful merges:

 - #5725 (should_impl_trait - ignore methods with lifetime params)
 - #5837 (needless_collect: catch x: Vec<_> = iter.collect(); x.into_iter() ...)
 - #5846 (Handle mapping to Option in `map_flatten` lint)
 - #5848 (Add derive_ord_xor_partial_ord lint)
 - #5852 (Add lint for duplicate methods of trait bounds)
 - #5856 (Remove old Symbol reexport)

Failed merges:

r? @ghost

changelog: rollup
bors added a commit that referenced this pull request Aug 4, 2020
Rollup of 5 pull requests

Successful merges:

 - #5837 (needless_collect: catch x: Vec<_> = iter.collect(); x.into_iter() ...)
 - #5846 (Handle mapping to Option in `map_flatten` lint)
 - #5848 (Add derive_ord_xor_partial_ord lint)
 - #5852 (Add lint for duplicate methods of trait bounds)
 - #5856 (Remove old Symbol reexport)

Failed merges:

r? @ghost
bors added a commit that referenced this pull request Aug 4, 2020
Rollup of 5 pull requests

Successful merges:

 - #5837 (needless_collect: catch x: Vec<_> = iter.collect(); x.into_iter() ...)
 - #5846 (Handle mapping to Option in `map_flatten` lint)
 - #5848 (Add derive_ord_xor_partial_ord lint)
 - #5852 (Add lint for duplicate methods of trait bounds)
 - #5856 (Remove old Symbol reexport)

Failed merges:

r? @ghost

changelog: rollup
@bors bors merged commit 84455b2 into rust-lang:master Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: The marked PR was approved and is only waiting bors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants