Suggest swapping the equality when the message can't compare
occurs
#132695
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
In this case where
T
implementsPartialEq<String>
, swapping the equality is a good way to fix it.Although #132404 has implemented this, it only covers the case where
error[0308]: mismatched types
occurs.Other cases
No response
Rust Version
1.84.0-nightly (2024-10-15 e7c0d27) (playground)
Anything else?
No response
The text was updated successfully, but these errors were encountered: