Tracking Issue for `f32_from_f16`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
Feature gate: #![feature(f32_from_f16)]
This is a tracking issue the From<f16> for f32 instance. Issue https://github.com/rust-lang/rust/issues/123831 describes the problem:
Adding a From for f32 impl breaks some inference that currently works. From https://github.com/rust-lang/rust/issues/123824:
fn main() { let x = f32::from(3.14); }
The type checker now implements a workaround to keep that code compiling in the presence of the f16 implementation. Because that is a workaround, and we might get a better solution in the future, the implementation is kept unstable for now.
Public API
From<f16> for f32 { /* ... */ }
Steps / History
(Remember to update the S-tracking-* label when checking boxes.)
- Implementation: https://github.com/rust-lang/rust/pull/139087
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- None yet.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the implementation PR 139087 and the related issues 123831 and 123824 to understand the inference workaround behind From<f16> for f32. Follow the tracking checklist for the final comment period and stabilization PR; the work is done when the unresolved questions are settled and both remaining checklist steps are complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100