@@ -479,11 +479,10 @@ impl f64 {
479
479
/// # Examples
480
480
///
481
481
/// ```
482
- /// #![feature(float_to_from_bytes)]
483
482
/// let bytes = 12.5f64.to_be_bytes();
484
483
/// assert_eq!(bytes, [0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);
485
484
/// ```
486
- #[ unstable ( feature = "float_to_from_bytes" , issue = "60446 " ) ]
485
+ #[ stable ( feature = "float_to_from_bytes" , since = "1.40.0 " ) ]
487
486
#[ inline]
488
487
pub fn to_be_bytes ( self ) -> [ u8 ; 8 ] {
489
488
self . to_bits ( ) . to_be_bytes ( )
@@ -495,11 +494,10 @@ impl f64 {
495
494
/// # Examples
496
495
///
497
496
/// ```
498
- /// #![feature(float_to_from_bytes)]
499
497
/// let bytes = 12.5f64.to_le_bytes();
500
498
/// assert_eq!(bytes, [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40]);
501
499
/// ```
502
- #[ unstable ( feature = "float_to_from_bytes" , issue = "60446 " ) ]
500
+ #[ stable ( feature = "float_to_from_bytes" , since = "1.40.0 " ) ]
503
501
#[ inline]
504
502
pub fn to_le_bytes ( self ) -> [ u8 ; 8 ] {
505
503
self . to_bits ( ) . to_le_bytes ( )
@@ -517,7 +515,6 @@ impl f64 {
517
515
/// # Examples
518
516
///
519
517
/// ```
520
- /// #![feature(float_to_from_bytes)]
521
518
/// let bytes = 12.5f64.to_ne_bytes();
522
519
/// assert_eq!(
523
520
/// bytes,
@@ -528,7 +525,7 @@ impl f64 {
528
525
/// }
529
526
/// );
530
527
/// ```
531
- #[ unstable ( feature = "float_to_from_bytes" , issue = "60446 " ) ]
528
+ #[ stable ( feature = "float_to_from_bytes" , since = "1.40.0 " ) ]
532
529
#[ inline]
533
530
pub fn to_ne_bytes ( self ) -> [ u8 ; 8 ] {
534
531
self . to_bits ( ) . to_ne_bytes ( )
@@ -539,11 +536,10 @@ impl f64 {
539
536
/// # Examples
540
537
///
541
538
/// ```
542
- /// #![feature(float_to_from_bytes)]
543
539
/// let value = f64::from_be_bytes([0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);
544
540
/// assert_eq!(value, 12.5);
545
541
/// ```
546
- #[ unstable ( feature = "float_to_from_bytes" , issue = "60446 " ) ]
542
+ #[ stable ( feature = "float_to_from_bytes" , since = "1.40.0 " ) ]
547
543
#[ inline]
548
544
pub fn from_be_bytes ( bytes : [ u8 ; 8 ] ) -> Self {
549
545
Self :: from_bits ( u64:: from_be_bytes ( bytes) )
@@ -554,11 +550,10 @@ impl f64 {
554
550
/// # Examples
555
551
///
556
552
/// ```
557
- /// #![feature(float_to_from_bytes)]
558
553
/// let value = f64::from_le_bytes([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40]);
559
554
/// assert_eq!(value, 12.5);
560
555
/// ```
561
- #[ unstable ( feature = "float_to_from_bytes" , issue = "60446 " ) ]
556
+ #[ stable ( feature = "float_to_from_bytes" , since = "1.40.0 " ) ]
562
557
#[ inline]
563
558
pub fn from_le_bytes ( bytes : [ u8 ; 8 ] ) -> Self {
564
559
Self :: from_bits ( u64:: from_le_bytes ( bytes) )
@@ -576,15 +571,14 @@ impl f64 {
576
571
/// # Examples
577
572
///
578
573
/// ```
579
- /// #![feature(float_to_from_bytes)]
580
574
/// let value = f64::from_ne_bytes(if cfg!(target_endian = "big") {
581
575
/// [0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
582
576
/// } else {
583
577
/// [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40]
584
578
/// });
585
579
/// assert_eq!(value, 12.5);
586
580
/// ```
587
- #[ unstable ( feature = "float_to_from_bytes" , issue = "60446 " ) ]
581
+ #[ stable ( feature = "float_to_from_bytes" , since = "1.40.0 " ) ]
588
582
#[ inline]
589
583
pub fn from_ne_bytes ( bytes : [ u8 ; 8 ] ) -> Self {
590
584
Self :: from_bits ( u64:: from_ne_bytes ( bytes) )
0 commit comments