Order of operands to equality expression matters when inferring a AsRef implementation #23762
Labels
A-inference
Area: Type inference
A-type-system
Area: Type system
C-bug
Category: This is a bug.
I-needs-decision
Issue: In need of a decision.
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
This may be related to or the same as #23673, but I wanted to file it anyway as it seems to have a slightly different flavor.
Fails with
However, if you flip the order of the arguments to the equality operator, then the code compiles and the correct type is inferred. It seems as if both forms should work the same.
Originally from this Stack Overflow question
The text was updated successfully, but these errors were encountered: