mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Add impl From<f16> for f32
This commit is contained in:
committed by
Folkert de Vries
parent
c021d2ddd4
commit
f354fa86b3
@@ -174,6 +174,7 @@ fn from(small: $small) -> Self {
|
||||
// float -> float
|
||||
// FIXME(f16,f128): adding additional `From<{float}>` impls to `f32` breaks inference. See
|
||||
// <https://github.com/rust-lang/rust/issues/123831>
|
||||
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")]);
|
||||
|
||||
Reference in New Issue
Block a user