Skip to content

Commit 5a085ee

Browse files
committed
Remove From impls for unstable types that break inference
Adding additional `From` implementations that fit `f32::from(<unaffixed float>)` broke inference. Remove these for now. Fixes: <rust-lang#123824>
1 parent 4486f02 commit 5a085ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/convert/num.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ impl_from!(u16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0"
165165
impl_from!(u32 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
166166

167167
// float -> float
168-
impl_from!(f16 => f32, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
169-
impl_from!(f16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
168+
// FIXME(f16_f128): adding additional `From` impls for existing types breaks inference. See
169+
// <https://github.com/rust-lang/rust/issues/123824>
170170
impl_from!(f16 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
171171
impl_from!(f32 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
172172
impl_from!(f32 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);

0 commit comments

Comments
 (0)