We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c5264a5 + b57ea56 commit adb7984Copy full SHA for adb7984
src/liballoc/string.rs
@@ -1576,15 +1576,14 @@ impl FromUtf8Error {
1576
/// Basic usage:
1577
///
1578
/// ```
1579
- /// #![feature(from_utf8_error_as_bytes)]
1580
/// // some invalid bytes, in a vector
1581
/// let bytes = vec![0, 159];
1582
1583
/// let value = String::from_utf8(bytes);
1584
1585
/// assert_eq!(&[0, 159], value.unwrap_err().as_bytes());
1586
1587
- #[unstable(feature = "from_utf8_error_as_bytes", reason = "recently added", issue = "40895")]
+ #[stable(feature = "from_utf8_error_as_bytes", since = "1.26.0")]
1588
pub fn as_bytes(&self) -> &[u8] {
1589
&self.bytes[..]
1590
}
0 commit comments