Skip to content

Commit

Permalink
Re-add From<f16> for f64
Browse files Browse the repository at this point in the history
  • Loading branch information
beetrees committed May 4, 2024
1 parent d568423 commit 5cc4ee3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/core/src/convert/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ impl_from!(u16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0"
impl_from!(u32 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);

// float -> float
// FIXME(f16_f128): adding additional `From` impls for existing types breaks inference. See
// <https://github.com/rust-lang/rust/issues/123824>
// FIXME(f16_f128): adding additional `From<{float}>` impls to `f32` breaks inference. See
// <https://github.com/rust-lang/rust/issues/123831>
impl_from!(f16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
impl_from!(f16 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
impl_from!(f32 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
impl_from!(f32 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
Expand Down

0 comments on commit 5cc4ee3

Please sign in to comment.