Skip to content

Commit bb79c28

Browse files
committed
Add impl From<f16> for f32
1 parent af99af1 commit bb79c28

File tree

1 file changed

+1
-2
lines changed
  • library/core/src/convert

1 file changed

+1
-2
lines changed

library/core/src/convert/num.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,8 @@ impl_from!(u32 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0
185185
// impl_from!(u64 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
186186

187187
// float -> float
188-
// FIXME(f16_f128): adding additional `From<{float}>` impls to `f32` breaks inference. See
189-
// <https://github.com/rust-lang/rust/issues/123831>
190188
impl_from!(f16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
189+
impl_from!(f16 => f32, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
191190
impl_from!(f16 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
192191
impl_from!(f32 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
193192
impl_from!(f32 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);

0 commit comments

Comments
 (0)