Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f5e00ec

Browse files
committed
Add impl From<f16> for f32
1 parent cfde659 commit f5e00ec

File tree

1 file changed

+1
-2
lines changed
  • library/core/src/convert

1 file changed

+1
-2
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")]);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /