Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upOrder of operands to equality expression matters when inferring a AsRef implementation #23762
Comments
steveklabnik
added
the
A-typesystem
label
Mar 27, 2015
This comment has been minimized.
This comment has been minimized.
hawkw
commented
Apr 12, 2015
|
I've seen what (appears to be) a similar issue when trying to use |
This comment has been minimized.
This comment has been minimized.
|
Still repros. |
brson
added
I-needs-decision
P-low
T-compiler
labels
Dec 1, 2016
Mark-Simulacrum
added
A-inference
C-bug
labels
Jul 22, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
shepmaster commentedMar 26, 2015
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