Skip to content

Commit f354fa8

Browse files
beetreesfolkertdev
authored andcommitted
Add impl From<f16> for f32
1 parent c021d2d commit f354fa8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • library/core/src/convert

library/core/src/convert/num.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ impl_from!(u64 => f128, #[unstable(feature = "f128", issue = "116909")], #[unsta
174174
// float -> float
175175
// FIXME(f16,f128): adding additional `From<{float}>` impls to `f32` breaks inference. See
176176
// <https://github.com/rust-lang/rust/issues/123831>
177+
impl_from!(f16 => f32, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
177178
impl_from!(f16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
178179
impl_from!(f16 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
179180
impl_from!(f32 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);

0 commit comments

Comments
 (0)