-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
f32::from(<untyped float>) inference with f16 and f128 #123831
Copy link
Copy link
Open
Labels
F-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]``#![feature(f16)]`, `#![feature(f128)]`T-langRelevant to the language teamRelevant to the language teamT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
F-f16_and_f128`#![feature(f16)]`, `#![feature(f128)]``#![feature(f16)]`, `#![feature(f128)]`T-langRelevant to the language teamRelevant to the language teamT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Adding a
From<f16> for f32impl breaks some inference that currently works. From #123824:The new float types are a long way from being stable, but it may be good to decide how to handle things if we would like this implementation one day. Per @fmease at #123824 (comment), there are three options:
From<f16> for f32I'll mark this with the edition label so it can at least come into consideration, but this is the lowest priority thing on any list.
Known failure points from adding this directly:
f32#123824 (comment))taffy: https://github.com/DioxusLabs/taffy/blob/f1e4edab96ee13f7d1fbc2536ac31633b0e620d6/src/style_helpers.rs#L58 (from Type inference failure forf32#123824 (comment))contour-rs: https://github.com/mthh/contour-rs/blob/08c1d83a1461aa19543ed402d23908eb55234fd1/src/lib.rs#L488-L491 (from Fix overflow when using large raster sizes mthh/contour-rs#13 (comment))f32::from(<untyped float>)inference withf16andf128#123831 (comment)the trait bound f32: From<f64> is not satisfiederror on nightly emilk/egui#4352@rustbot label +T-lang +T-libs +A-edition-2024 +F-f16_and_f128