Error converting from i32 to f64 when type parameter implements From<f64> #73653
Labels
A-type-system
Area: Type system
C-bug
Category: This is a bug.
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.
I tried this code:
I expected to see this happen: should compile and do the right thing.
Instead, this happened:
On the other hand, this code compiles fine:
Meta
I was surprised about this, so after running this with 1.44.0 and 1.44.1 I checked older versions, but 1.39.0, 1.31.0 and 1.15.0 all give the same error. Seems likely that there is an issue about this already, but no clue how to look for it.
The text was updated successfully, but these errors were encountered: