File tree 3 files changed +4
-9
lines changed
3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -1090,12 +1090,11 @@ impl f32 {
1090
1090
/// # Examples
1091
1091
///
1092
1092
/// ```
1093
- /// #![feature(float_bits_conv)]
1094
1093
/// assert_ne!((1f32).to_bits(), 1f32 as u32); // to_bits() is not casting!
1095
1094
/// assert_eq!((12.5f32).to_bits(), 0x41480000);
1096
1095
///
1097
1096
/// ```
1098
- #[ unstable ( feature = "float_bits_conv" , reason = "recently added" , issue = "40470 ") ]
1097
+ #[ stable ( feature = "float_bits_conv" , since = "1.20.0 " ) ]
1099
1098
#[ inline]
1100
1099
pub fn to_bits ( self ) -> u32 {
1101
1100
unsafe { :: mem:: transmute ( self ) }
@@ -1118,7 +1117,6 @@ impl f32 {
1118
1117
/// # Examples
1119
1118
///
1120
1119
/// ```
1121
- /// #![feature(float_bits_conv)]
1122
1120
/// use std::f32;
1123
1121
/// let v = f32::from_bits(0x41480000);
1124
1122
/// let difference = (v - 12.5).abs();
@@ -1127,7 +1125,7 @@ impl f32 {
1127
1125
/// let snan = 0x7F800001;
1128
1126
/// assert_ne!(f32::from_bits(snan).to_bits(), snan);
1129
1127
/// ```
1130
- #[ unstable ( feature = "float_bits_conv" , reason = "recently added" , issue = "40470 ") ]
1128
+ #[ stable ( feature = "float_bits_conv" , since = "1.20.0 " ) ]
1131
1129
#[ inline]
1132
1130
pub fn from_bits ( mut v : u32 ) -> Self {
1133
1131
const EXP_MASK : u32 = 0x7F800000 ;
Original file line number Diff line number Diff line change @@ -1005,12 +1005,11 @@ impl f64 {
1005
1005
/// # Examples
1006
1006
///
1007
1007
/// ```
1008
- /// #![feature(float_bits_conv)]
1009
1008
/// assert!((1f64).to_bits() != 1f64 as u64); // to_bits() is not casting!
1010
1009
/// assert_eq!((12.5f64).to_bits(), 0x4029000000000000);
1011
1010
///
1012
1011
/// ```
1013
- #[ unstable ( feature = "float_bits_conv" , reason = "recently added" , issue = "40470 ") ]
1012
+ #[ stable ( feature = "float_bits_conv" , since = "1.20.0 " ) ]
1014
1013
#[ inline]
1015
1014
pub fn to_bits ( self ) -> u64 {
1016
1015
unsafe { :: mem:: transmute ( self ) }
@@ -1033,7 +1032,6 @@ impl f64 {
1033
1032
/// # Examples
1034
1033
///
1035
1034
/// ```
1036
- /// #![feature(float_bits_conv)]
1037
1035
/// use std::f64;
1038
1036
/// let v = f64::from_bits(0x4029000000000000);
1039
1037
/// let difference = (v - 12.5).abs();
@@ -1042,7 +1040,7 @@ impl f64 {
1042
1040
/// let snan = 0x7FF0000000000001;
1043
1041
/// assert_ne!(f64::from_bits(snan).to_bits(), snan);
1044
1042
/// ```
1045
- #[ unstable ( feature = "float_bits_conv" , reason = "recently added" , issue = "40470 ") ]
1043
+ #[ stable ( feature = "float_bits_conv" , since = "1.20.0 " ) ]
1046
1044
#[ inline]
1047
1045
pub fn from_bits ( mut v : u64 ) -> Self {
1048
1046
const EXP_MASK : u64 = 0x7FF0000000000000 ;
Original file line number Diff line number Diff line change 320
320
#![ feature( unwind_attributes) ]
321
321
#![ feature( vec_push_all) ]
322
322
#![ cfg_attr( test, feature( update_panic_count) ) ]
323
- #![ cfg_attr( test, feature( float_bits_conv) ) ]
324
323
325
324
// Explicitly import the prelude. The compiler uses this same unstable attribute
326
325
// to import the prelude implicitly when building crates that depend on std.
You can’t perform that action at this time.
0 commit comments