From f354fa86b3fefee613133dc992c68452351f572a Mon Sep 17 00:00:00 2001 From: beetrees Date: Fri, 28 Mar 2025 20:09:30 +0000 Subject: [PATCH] Add `impl From for f32` --- library/core/src/convert/num.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/src/convert/num.rs b/library/core/src/convert/num.rs index 673245056e79..476ee7638675 100644 --- a/library/core/src/convert/num.rs +++ b/library/core/src/convert/num.rs @@ -174,6 +174,7 @@ fn from(small: $small) -> Self { // float -> float // FIXME(f16,f128): adding additional `From<{float}>` impls to `f32` breaks inference. See // +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")]);