Change tracking issue from #49792 to #51919 · rust-lang/rust@0ddfae5 (original) (raw)
`@@ -1903,7 +1903,7 @@ $EndFeature, "
`
1903
1903
`/// let bytes = 0x12345678i32.to_be_bytes();
`
1904
1904
`/// assert_eq!(bytes, [0x12, 0x34, 0x56, 0x78]);
`
1905
1905
```` /// ```
`1906`
``
`-
#[unstable(feature = "int_to_from_bytes", issue = "49792")]
`
``
`1906`
`+
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
`
`1907`
`1907`
` #[inline]
`
`1908`
`1908`
`pub fn to_be_bytes(self) -> [u8; mem::size_of::<Self>()] {
`
`1909`
`1909`
`self.to_be().to_ne_bytes()
`
`@@ -1920,7 +1920,7 @@ $EndFeature, "
`
`1920`
`1920`
`/// let bytes = 0x12345678i32.to_le_bytes();
`
`1921`
`1921`
`/// assert_eq!(bytes, [0x78, 0x56, 0x34, 0x12]);
`
`1922`
`1922`
```` /// ```
1923
``
`-
#[unstable(feature = "int_to_from_bytes", issue = "49792")]
`
``
1923
`+
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
`
1924
1924
` #[inline]
`
1925
1925
`pub fn to_le_bytes(self) -> [u8; mem::size_of::()] {
`
1926
1926
`self.to_le().to_ne_bytes()
`
`@@ -1944,7 +1944,7 @@ $EndFeature, "
`
1944
1944
`/// let bytes = i32::min_value().to_be().to_ne_bytes();
`
1945
1945
`/// assert_eq!(bytes, [0x80, 0, 0, 0]);
`
1946
1946
```` /// ```
`1947`
``
`-
#[unstable(feature = "int_to_from_bytes", issue = "49792")]
`
``
`1947`
`+
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
`
`1948`
`1948`
` #[inline]
`
`1949`
`1949`
`pub fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
`
`1950`
`1950`
`unsafe { mem::transmute(self) }
`
`@@ -1961,7 +1961,7 @@ $EndFeature, "
`
`1961`
`1961`
`/// let int = i32::from_be_bytes([0x12, 0x34, 0x56, 0x78]);
`
`1962`
`1962`
`/// assert_eq!(int, 0x12_34_56_78);
`
`1963`
`1963`
```` /// ```
1964
``
`-
#[unstable(feature = "int_to_from_bytes", issue = "49792")]
`
``
1964
`+
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
`
1965
1965
` #[inline]
`
1966
1966
`pub fn from_be_bytes(bytes: [u8; mem::size_of::()]) -> Self {
`
1967
1967
`Self::from_be(Self::from_ne_bytes(bytes))
`
`@@ -1978,7 +1978,7 @@ $EndFeature, "
`
1978
1978
`/// let int = i32::from_le_bytes([0x12, 0x34, 0x56, 0x78]);
`
1979
1979
`/// assert_eq!(int, 0x78_56_34_12);
`
1980
1980
```` /// ```
`1981`
``
`-
#[unstable(feature = "int_to_from_bytes", issue = "49792")]
`
``
`1981`
`+
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
`
`1982`
`1982`
` #[inline]
`
`1983`
`1983`
`pub fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
`
`1984`
`1984`
`Self::from_le(Self::from_ne_bytes(bytes))
`
`@@ -2002,7 +2002,7 @@ $EndFeature, "
`
`2002`
`2002`
`/// let int = i32::from_be(i32::from_ne_bytes([0x80, 0, 0, 0]));
`
`2003`
`2003`
`/// assert_eq!(int, i32::min_value());
`
`2004`
`2004`
```` /// ```
2005
``
`-
#[unstable(feature = "int_to_from_bytes", issue = "49792")]
`
``
2005
`+
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
`
2006
2006
` #[inline]
`
2007
2007
`pub fn from_ne_bytes(bytes: [u8; mem::size_of::()]) -> Self {
`
2008
2008
`unsafe { mem::transmute(bytes) }
`
`@@ -3589,7 +3589,7 @@ $EndFeature, "
`
3589
3589
`/// let bytes = 0x1234_5678_u32.to_be().to_bytes();
`
3590
3590
`/// assert_eq!(bytes, [0x12, 0x34, 0x56, 0x78]);
`
3591
3591
```` /// ```
`3592`
``
`-
#[unstable(feature = "int_to_from_bytes", issue = "49792")]
`
``
`3592`
`+
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
`
`3593`
`3593`
` #[inline]
`
`3594`
`3594`
`pub fn to_bytes(self) -> [u8; mem::size_of::<Self>()] {
`
`3595`
`3595`
`unsafe { mem::transmute(self) }
`
`@@ -3611,7 +3611,7 @@ $EndFeature, "
`
`3611`
`3611`
`/// let int = u32::from_be(u32::from_bytes([0x12, 0x34, 0x56, 0x78]));
`
`3612`
`3612`
`/// assert_eq!(int, 0x1234_5678_u32);
`
`3613`
`3613`
```` /// ```
3614
``
`-
#[unstable(feature = "int_to_from_bytes", issue = "49792")]
`
``
3614
`+
#[unstable(feature = "int_to_from_bytes", issue = "52963")]
`
3615
3615
` #[inline]
`
3616
3616
`pub fn from_bytes(bytes: [u8; mem::size_of::()]) -> Self {
`
3617
3617
`unsafe { mem::transmute(bytes) }
`