@@ -70,8 +70,8 @@ impl_from_bool!(i8 i16 i32 i64 i128 isize);
7070
7171/// Implement `From<$small>` for `$large`
7272macro_rules! impl_from {
73- ( $small: ty => $large: ty, #[ $attr : meta] ) => {
74- #[ $attr ]
73+ ( $small: ty => $large: ty, $ ( #[ $attrs : meta] ) ,+ ) => {
74+ $ ( #[ $attrs ] ) +
7575 #[ rustc_const_unstable( feature = "const_convert" , issue = "143773" ) ]
7676 impl const From <$small> for $large {
7777 #[ doc = concat!( "Converts from [`" , stringify!( $small) , "`] to [`" , stringify!( $large) , "`] losslessly." ) ]
@@ -157,8 +157,7 @@ impl_from!(i16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0"
157157impl_from ! ( i16 => f128, #[ stable( feature = "lossless_float_conv" , since = "1.6.0" ) ] ) ;
158158impl_from ! ( i32 => f64 , #[ stable( feature = "lossless_float_conv" , since = "1.6.0" ) ] ) ;
159159impl_from ! ( i32 => f128, #[ stable( feature = "lossless_float_conv" , since = "1.6.0" ) ] ) ;
160- // FIXME(f128): This impl would allow using `f128` on stable before it is stabilised.
161- // impl_from!(i64 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
160+ impl_from ! ( i64 => f128, #[ unstable( feature = "f128" , issue = "116909" ) ] , #[ unstable_feature_bound( f128) ] ) ;
162161
163162// unsigned integer -> float
164163impl_from ! ( u8 => f16, #[ stable( feature = "lossless_float_conv" , since = "1.6.0" ) ] ) ;
@@ -170,8 +169,7 @@ impl_from!(u16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0"
170169impl_from ! ( u16 => f128, #[ stable( feature = "lossless_float_conv" , since = "1.6.0" ) ] ) ;
171170impl_from ! ( u32 => f64 , #[ stable( feature = "lossless_float_conv" , since = "1.6.0" ) ] ) ;
172171impl_from ! ( u32 => f128, #[ stable( feature = "lossless_float_conv" , since = "1.6.0" ) ] ) ;
173- // FIXME(f128): This impl would allow using `f128` on stable before it is stabilised.
174- // impl_from!(u64 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
172+ impl_from ! ( u64 => f128, #[ unstable( feature = "f128" , issue = "116909" ) ] , #[ unstable_feature_bound( f128) ] ) ;
175173
176174// float -> float
177175// FIXME(f16,f128): adding additional `From<{float}>` impls to `f32` breaks inference. See
0 commit comments