Skip to content

Commit 9bfc062

Browse files
committed
Fix doc example, and change fn annotation to stable
1 parent 1a4aa1e commit 9bfc062

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/libcore/ascii.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use iter::FusedIterator;
3131
/// documentation for more.
3232
///
3333
/// [`escape_default`]: fn.escape_default.html
34-
#[unstable(feature = "core_ascii", issue = "46409")]
34+
#[stable(feature = "core_ascii", since = "1.26.0")]
3535
pub struct EscapeDefault {
3636
range: Range<usize>,
3737
data: [u8; 4],
@@ -57,8 +57,7 @@ pub struct EscapeDefault {
5757
/// # Examples
5858
///
5959
/// ```
60-
/// #![no_std]
61-
/// use core::ascii;
60+
/// use std::ascii;
6261
///
6362
/// let escaped = ascii::escape_default(b'0').next().unwrap();
6463
/// assert_eq!(b'0', escaped);
@@ -100,7 +99,7 @@ pub struct EscapeDefault {
10099
/// assert_eq!(b'9', escaped.next().unwrap());
101100
/// assert_eq!(b'd', escaped.next().unwrap());
102101
/// ```
103-
#[unstable(feature = "core_ascii", issue = "46409")]
102+
#[stable(feature = "core_ascii", since = "1.26.0")]
104103
pub fn escape_default(c: u8) -> EscapeDefault {
105104
let (data, len) = match c {
106105
b'\t' => ([b'\\', b't', 0, 0], 2),

0 commit comments

Comments
 (0)