Type inference failure when f64 ops are not explicitly stated #122595
Labels
A-inference
Area: Type inference
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
I tried this code:
This code is valid due to the implementation of
Add<&f64> for &f64
in the standard library.The compiler reports this error:
The expected type is not necessary and E0308 should not appear and finding f64 is correct.
If the following bound is added the code compiles without issue:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: