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

cmp_owned: handle when PartialEq is not implemented symmetrically #5701

Merged
merged 2 commits into from
Jun 24, 2020

Conversation

ebroto
Copy link
Member

@ebroto ebroto commented Jun 9, 2020

changelog: Handle asymmetrical implementations of PartialEq in [cmp_owned].

Fixes #4874

@rust-highfive
Copy link

r? @flip1995

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 9, 2020
@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 Jun 12, 2020
@ebroto
Copy link
Member Author

ebroto commented Jun 12, 2020

I think I've addressed all of @mikerite's suggestions (thanks again).

Besides reversing the operands when necessary, the lint will not erroneously suggest dereferencing when it's not implemented and catches some FN.

@ebroto ebroto changed the title cmp_owned: avoid FP when PartialEq is not implemented symmetrically cmp_owned: handle when PartialEq is not implemented symmetrically Jun 12, 2020
@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 Jun 13, 2020
@flip1995
Copy link
Member

Looks really good now, thanks! And thanks @mikerite for helping reviewing!

@bors r+

@bors
Copy link
Contributor

bors commented Jun 24, 2020

📌 Commit b498e1d has been approved by flip1995

@bors
Copy link
Contributor

bors commented Jun 24, 2020

⌛ Testing commit b498e1d with merge 46d3304...

@bors
Copy link
Contributor

bors commented Jun 24, 2020

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

@bors bors merged commit 46d3304 into rust-lang:master Jun 24, 2020
@ebroto ebroto deleted the 4874_cmp_owned_fp branch June 24, 2020 16:42
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
Development

Successfully merging this pull request may close these issues.

cmp_owned false positives - proc_macro Ident
4 participants