assert_eq(x, y) is not the same as assert_eq(y, x) because of type inferrence #70500
Labels
A-inference
Area: Type inference
C-bug
Category: This is a bug.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
I tried this code (playground):
I expected to see this happen: The program compiles and runs successfully.
Instead, this happened:
Note that the
assert_eq!(0_i64, S::zero());
works as expected.Meta
rustc --version --verbose
:The same error is present on nightly:
The text was updated successfully, but these errors were encountered: