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 f4cb5a7

Browse files
committed
Add impl From<f16> for f32
1 parent 5f8a953 commit f4cb5a7

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
@@ -185,9 +185,8 @@ impl_from!(u32 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0
185185
// impl_from!(u64 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
186186

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

0 commit comments

Comments
(0)

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