Skip to content

Commit 8d46be7

Browse files
Auto merge of #142723 - beetrees:crater-impl-from-f16-for-f32, r=<try>
[crater] Add `impl From<f16> for f32` Crater run to see what the effects of adding `impl From<f16> for f32` without changing the fallback (a.k.a. things that would be caught by the FCW in #139087). This needs a ``@craterbot` check`.
2 parents 2fcf177 + e4ad46e commit 8d46be7

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

library/core/src/convert/num.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,7 @@ impl_from!(u32 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0
184184
// impl_from!(u64 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
185185

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

tests/ui/inference/untyped-primitives.rs

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)