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

Fixes [trait_duplication_in_bounds] false positives #9167

Merged
merged 4 commits into from
Aug 14, 2022

Conversation

aldhsu
Copy link
Contributor

@aldhsu aldhsu commented Jul 13, 2022

Fixes #9076 #9151 #8757.
Partially fixes #8771.

changelog: [trait_duplication_in_bounds]: Reduce number of false positives.

@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.

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 13, 2022
@flip1995
Copy link
Member

Assigning this to me, since I reviewed the last PR. I pormise that it won't take me 2 months this time!

r? @flip1995

Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

Early review. I still have to look through the tests, but the impl changes LGTM overall.

clippy_lints/src/trait_bounds.rs Show resolved Hide resolved
@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jul 28, 2022
- only compare where predicates to trait bounds when generating where
  clause specific message to fix rust-lang#9151
- use comparable_trait_ref to account for trait bound generics to fix rust-lang#8757
@aldhsu aldhsu force-pushed the fix-trait-duplication-false-pos branch from 7f2797a to 3ddc04f Compare August 2, 2022 12:00
@flip1995 flip1995 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Aug 2, 2022
@flip1995
Copy link
Member

flip1995 commented Aug 2, 2022

Thanks! This was the only thing for now. The comments added are great! I now have to go through the tests, but I don't expect that there's anything left for you to do 👍

@aldhsu
Copy link
Contributor Author

aldhsu commented Aug 11, 2022

@flip1995 I worked on a refactor to lint in one pass 8bae517. I thought it would be harder than it turned out to be. I've added it to this PR. I'm happy to split it to a separate PR if you prefer.

@aldhsu aldhsu force-pushed the fix-trait-duplication-false-pos branch from 0cf2864 to 3ddc04f Compare August 12, 2022 02:40
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

Awesome work, thanks! Now I wonder if I had waited even longer with my review, would you fix all of Clippy? 🤔 😛

@flip1995
Copy link
Member

Maybe in another PR :D

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 14, 2022

📌 Commit 8bae517 has been approved by flip1995

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Aug 14, 2022

⌛ Testing commit 8bae517 with merge 84df61c...

@bors
Copy link
Collaborator

bors commented Aug 14, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 84df61c to master...

@bors bors merged commit 84df61c into rust-lang:master Aug 14, 2022
@aldhsu aldhsu deleted the fix-trait-duplication-false-pos branch August 14, 2022 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
5 participants