Add impl From<f16> for f32

This commit is contained in:
beetrees
2025-03-28 20:09:30 +00:00
committed by Folkert de Vries
parent c021d2ddd4
commit f354fa86b3
+1
View File
@@ -174,6 +174,7 @@ fn from(small: $small) -> Self {
// float -> float
// FIXME(f16,f128): adding additional `From<{float}>` impls to `f32` breaks inference. See
// <https://github.com/rust-lang/rust/issues/123831>
impl_from!(f16 => f32, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
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")]);