about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-03-25 01:26:29 +0800
committerGitHub <noreply@github.com>2018-03-25 01:26:29 +0800
commitadb7984f10903783911c0dacf81bc043464519f7 (patch)
treed8b744697d15730b2bdbd0b0a5827966aebcc9c4
parentc5264a5932d4a7540372759c853a9e863ce74097 (diff)
parentb57ea5615921609815752c2d2133956b8a4fded6 (diff)
downloadrust-adb7984f10903783911c0dacf81bc043464519f7.tar.gz
rust-adb7984f10903783911c0dacf81bc043464519f7.zip
Rollup merge of #49121 - varkor:stabilise-from_utf8_error_as_bytes, r=bluss
Stabilise FromUtf8Error::as_bytes

Closes #40895.
-rw-r--r--src/liballoc/string.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index 9fec9091498..e253122ffd6 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -1576,7 +1576,6 @@ impl FromUtf8Error {
     /// Basic usage:
     ///
     /// ```
-    /// #![feature(from_utf8_error_as_bytes)]
     /// // some invalid bytes, in a vector
     /// let bytes = vec![0, 159];
     ///
@@ -1584,7 +1583,7 @@ impl FromUtf8Error {
     ///
     /// assert_eq!(&[0, 159], value.unwrap_err().as_bytes());
     /// ```
-    #[unstable(feature = "from_utf8_error_as_bytes", reason = "recently added", issue = "40895")]
+    #[stable(feature = "from_utf8_error_as_bytes", since = "1.26.0")]
     pub fn as_bytes(&self) -> &[u8] {
         &self.bytes[..]
     }