@@ -1903,10 +1903,12 @@ $EndFeature, "
1903
1903
/// # Examples
1904
1904
///
1905
1905
/// ```
1906
+ /// #![feature(int_to_from_bytes)]
1907
+ ///
1906
1908
/// let bytes = i32::min_value().to_be().to_bytes();
1907
1909
/// assert_eq!(bytes, [0x80, 0, 0, 0]);
1908
1910
/// ```
1909
- #[ stable ( feature = "int_to_from_bytes" , since = "1.29.0 " ) ]
1911
+ #[ unstable ( feature = "int_to_from_bytes" , issue = "49792 " ) ]
1910
1912
#[ inline]
1911
1913
pub fn to_bytes( self ) -> [ u8 ; mem:: size_of:: <Self >( ) ] {
1912
1914
unsafe { mem:: transmute( self ) }
@@ -1923,10 +1925,12 @@ $EndFeature, "
1923
1925
/// # Examples
1924
1926
///
1925
1927
/// ```
1928
+ /// #![feature(int_to_from_bytes)]
1929
+ ///
1926
1930
/// let int = i32::from_be(i32::from_bytes([0x80, 0, 0, 0]));
1927
1931
/// assert_eq!(int, i32::min_value());
1928
1932
/// ```
1929
- #[ stable ( feature = "int_to_from_bytes" , since = "1.29.0 " ) ]
1933
+ #[ unstable ( feature = "int_to_from_bytes" , issue = "49792 " ) ]
1930
1934
#[ inline]
1931
1935
pub fn from_bytes( bytes: [ u8 ; mem:: size_of:: <Self >( ) ] ) -> Self {
1932
1936
unsafe { mem:: transmute( bytes) }
@@ -3508,10 +3512,12 @@ $EndFeature, "
3508
3512
/// # Examples
3509
3513
///
3510
3514
/// ```
3515
+ /// #![feature(int_to_from_bytes)]
3516
+ ///
3511
3517
/// let bytes = 0x1234_5678_u32.to_be().to_bytes();
3512
3518
/// assert_eq!(bytes, [0x12, 0x34, 0x56, 0x78]);
3513
3519
/// ```
3514
- #[ stable ( feature = "int_to_from_bytes" , since = "1.29.0 " ) ]
3520
+ #[ unstable ( feature = "int_to_from_bytes" , issue = "49792 " ) ]
3515
3521
#[ inline]
3516
3522
pub fn to_bytes( self ) -> [ u8 ; mem:: size_of:: <Self >( ) ] {
3517
3523
unsafe { mem:: transmute( self ) }
@@ -3528,10 +3534,12 @@ $EndFeature, "
3528
3534
/// # Examples
3529
3535
///
3530
3536
/// ```
3537
+ /// #![feature(int_to_from_bytes)]
3538
+ ///
3531
3539
/// let int = u32::from_be(u32::from_bytes([0x12, 0x34, 0x56, 0x78]));
3532
3540
/// assert_eq!(int, 0x1234_5678_u32);
3533
3541
/// ```
3534
- #[ stable ( feature = "int_to_from_bytes" , since = "1.29.0 " ) ]
3542
+ #[ unstable ( feature = "int_to_from_bytes" , issue = "49792 " ) ]
3535
3543
#[ inline]
3536
3544
pub fn from_bytes( bytes: [ u8 ; mem:: size_of:: <Self >( ) ] ) -> Self {
3537
3545
unsafe { mem:: transmute( bytes) }
0 commit comments