diff options
| author | beetrees <b@beetr.ee> | 2024-05-04 22:18:36 +0100 |
|---|---|---|
| committer | beetrees <b@beetr.ee> | 2024-05-04 22:56:35 +0100 |
| commit | 5cc4ee3d882d96a46ba75ffe17669feaddcae64b (patch) | |
| tree | a634414bfc161e584a3dbe2f241efe29d4c254de | |
| parent | d568423a7a4ddb4b49323d96078a22f94df55fbd (diff) | |
| download | rust-5cc4ee3d882d96a46ba75ffe17669feaddcae64b.tar.gz rust-5cc4ee3d882d96a46ba75ffe17669feaddcae64b.zip | |
Re-add `From<f16> for f64`
| -rw-r--r-- | library/core/src/convert/num.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/library/core/src/convert/num.rs b/library/core/src/convert/num.rs index 935ead2699a..86c4ea9fab0 100644 --- a/library/core/src/convert/num.rs +++ b/library/core/src/convert/num.rs @@ -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")]); |
