Skip to content

Suppress swapping equality suggestion in extern macro when check overloaded binop #139403

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

Closed
wants to merge 1 commit into from

Conversation

xizheyin
Copy link
Contributor

@xizheyin xizheyin commented Apr 5, 2025

Fixes #139050

I didn't add a ui test because I couldn't see the difference in the ui test before and after modifying the code.

r? @fmease

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 5, 2025
Copy link
Contributor

@makai410 makai410 left a comment

Choose a reason for hiding this comment

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

maybe adding a case like

assert_eq!((), &());

to tests/ui/suggestions/partialeq_suggest_swap.rs would be better?

@xizheyin
Copy link
Contributor Author

Thanks, I have replaced the fix to solve all similar problems at once, see #139316 . @makai410
Close this PR.

@xizheyin xizheyin closed this Apr 14, 2025
@xizheyin xizheyin deleted the issue-139050 branch April 14, 2025 12:33
@fmease fmease removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Misleading compiler suggestion: Swapp the equality in rustlib due to mismatched types in user code
4 participants