Type inference does not propagate back to {float} associated functions #102401
Labels
A-inference
Area: Type inference
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I tried this code (playground):
I expected rustc to infer the type of r as f32 based on the last line.
Instead, rustc failed to compile my program:
In most cases, type inference works both forwards and backwards, so why didn't it work here?
This is similar to #24124, but with an even stronger reason to feel the code should work. #99405 may also be related.
The text was updated successfully, but these errors were encountered: