From 9bfc06272310600e93e3127a3a257031d15eab7f Mon Sep 17 00:00:00 2001 From: 1011X <1011XXXXX@gmail.com> Date: Sun, 4 Mar 2018 20:32:44 -0500 Subject: [PATCH] Fix doc example, and change fn annotation to stable --- src/libcore/ascii.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libcore/ascii.rs b/src/libcore/ascii.rs index 32847506cdf..d61b9199560 100644 --- a/src/libcore/ascii.rs +++ b/src/libcore/ascii.rs @@ -31,7 +31,7 @@ /// documentation for more. /// /// [`escape_default`]: fn.escape_default.html -#[unstable(feature = "core_ascii", issue = "46409")] +#[stable(feature = "core_ascii", since = "1.26.0")] pub struct EscapeDefault { range: Range, data: [u8; 4], @@ -57,8 +57,7 @@ pub struct EscapeDefault { /// # Examples /// /// ``` -/// #![no_std] -/// use core::ascii; +/// use std::ascii; /// /// let escaped = ascii::escape_default(b'0').next().unwrap(); /// assert_eq!(b'0', escaped); @@ -100,7 +99,7 @@ pub struct EscapeDefault { /// assert_eq!(b'9', escaped.next().unwrap()); /// assert_eq!(b'd', escaped.next().unwrap()); /// ``` -#[unstable(feature = "core_ascii", issue = "46409")] +#[stable(feature = "core_ascii", since = "1.26.0")] pub fn escape_default(c: u8) -> EscapeDefault { let (data, len) = match c { b'\t' => ([b'\\', b't', 0, 0], 2),