Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/libstd/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ pub trait AsciiExt {
/// # Examples
///
/// ```
/// #![feature(ascii)]
///
/// use std::ascii::AsciiExt;
///
/// let ascii: String = "a".to_owned();
Expand All @@ -179,7 +177,7 @@ pub trait AsciiExt {
///
/// assert_eq!(upper, "A");
/// ```
#[unstable(feature = "ascii", issue = "27809")]
#[stable(feature = "into_ascii", since = "1.8.0")]
fn into_ascii_uppercase(self) -> Self::Owned where Self: Sized {
self.to_ascii_uppercase()
}
Expand All @@ -192,8 +190,6 @@ pub trait AsciiExt {
/// # Examples
///
/// ```
/// #![feature(ascii)]
///
/// use std::ascii::AsciiExt;
///
/// let ascii: String = "A".to_owned();
Expand All @@ -202,15 +198,15 @@ pub trait AsciiExt {
///
/// assert_eq!(lower, "a");
/// ```
#[unstable(feature = "ascii", issue = "27809")]
#[stable(feature = "into_ascii", since = "1.8.0")]
fn into_ascii_lowercase(self) -> Self::Owned where Self: Sized {
self.to_ascii_lowercase()
}
}

/// Implement `into_ascii_lowercase` and `into_ascii_uppercase` without memory allocation,
/// defer other methods to `str`.
#[unstable(feature = "ascii", issue = "27809")]
#[stable(feature = "into_ascii", since = "1.8.0")]
impl AsciiExt for String {
type Owned = Self;

Expand Down Expand Up @@ -242,7 +238,7 @@ impl AsciiExt for String {

/// Implement `into_ascii_lowercase` and `into_ascii_uppercase` without memory allocation,
/// defer other methods to `[u8]`.
#[unstable(feature = "ascii", issue = "27809")]
#[stable(feature = "into_ascii", since = "1.8.0")]
impl AsciiExt for Vec<u8> {
type Owned = Self;

Expand Down