Add 'feature' and 'since' to stability attributes
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
|
||||
//! Operations on ASCII strings and characters
|
||||
|
||||
#![unstable = "unsure about placement and naming"]
|
||||
#![unstable(feature = "unnamed_feature", since = "1.0.0",
|
||||
reason = "unsure about placement and naming")]
|
||||
|
||||
use iter::IteratorExt;
|
||||
use ops::FnMut;
|
||||
@@ -22,7 +23,8 @@ use string::String;
|
||||
use vec::Vec;
|
||||
|
||||
/// Extension methods for ASCII-subset only operations on owned strings
|
||||
#[unstable = "would prefer to do this in a more general way"]
|
||||
#[unstable(feature = "unnamed_feature", since = "1.0.0",
|
||||
reason = "would prefer to do this in a more general way")]
|
||||
pub trait OwnedAsciiExt {
|
||||
/// Convert the string to ASCII upper case:
|
||||
/// ASCII letters 'a' to 'z' are mapped to 'A' to 'Z',
|
||||
@@ -36,7 +38,8 @@ pub trait OwnedAsciiExt {
|
||||
}
|
||||
|
||||
/// Extension methods for ASCII-subset only operations on string slices
|
||||
#[unstable = "would prefer to do this in a more general way"]
|
||||
#[unstable(feature = "unnamed_feature", since = "1.0.0",
|
||||
reason = "would prefer to do this in a more general way")]
|
||||
pub trait AsciiExt<T = Self> {
|
||||
/// Check if within the ASCII range.
|
||||
fn is_ascii(&self) -> bool;
|
||||
@@ -57,7 +60,8 @@ pub trait AsciiExt<T = Self> {
|
||||
fn eq_ignore_ascii_case(&self, other: &Self) -> bool;
|
||||
}
|
||||
|
||||
#[unstable = "would prefer to do this in a more general way"]
|
||||
#[unstable(feature = "unnamed_feature", since = "1.0.0",
|
||||
reason = "would prefer to do this in a more general way")]
|
||||
impl AsciiExt<String> for str {
|
||||
#[inline]
|
||||
fn is_ascii(&self) -> bool {
|
||||
@@ -82,7 +86,8 @@ impl AsciiExt<String> for str {
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable = "would prefer to do this in a more general way"]
|
||||
#[unstable(feature = "unnamed_feature", since = "1.0.0",
|
||||
reason = "would prefer to do this in a more general way")]
|
||||
impl OwnedAsciiExt for String {
|
||||
#[inline]
|
||||
fn into_ascii_uppercase(self) -> String {
|
||||
@@ -97,7 +102,8 @@ impl OwnedAsciiExt for String {
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable = "would prefer to do this in a more general way"]
|
||||
#[unstable(feature = "unnamed_feature", since = "1.0.0",
|
||||
reason = "would prefer to do this in a more general way")]
|
||||
impl AsciiExt<Vec<u8>> for [u8] {
|
||||
#[inline]
|
||||
fn is_ascii(&self) -> bool {
|
||||
@@ -123,7 +129,8 @@ impl AsciiExt<Vec<u8>> for [u8] {
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable = "would prefer to do this in a more general way"]
|
||||
#[unstable(feature = "unnamed_feature", since = "1.0.0",
|
||||
reason = "would prefer to do this in a more general way")]
|
||||
impl OwnedAsciiExt for Vec<u8> {
|
||||
#[inline]
|
||||
fn into_ascii_uppercase(mut self) -> Vec<u8> {
|
||||
@@ -142,7 +149,8 @@ impl OwnedAsciiExt for Vec<u8> {
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable = "would prefer to do this in a more general way"]
|
||||
#[unstable(feature = "unnamed_feature", since = "1.0.0",
|
||||
reason = "would prefer to do this in a more general way")]
|
||||
impl AsciiExt for u8 {
|
||||
#[inline]
|
||||
fn is_ascii(&self) -> bool {
|
||||
@@ -165,7 +173,8 @@ impl AsciiExt for u8 {
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable = "would prefer to do this in a more general way"]
|
||||
#[unstable(feature = "unnamed_feature", since = "1.0.0",
|
||||
reason = "would prefer to do this in a more general way")]
|
||||
impl AsciiExt for char {
|
||||
#[inline]
|
||||
fn is_ascii(&self) -> bool {
|
||||
@@ -207,7 +216,8 @@ impl AsciiExt for char {
|
||||
/// - Any other chars in the range [0x20,0x7e] are not escaped.
|
||||
/// - Any other chars are given hex escapes.
|
||||
/// - Unicode escapes are never generated by this function.
|
||||
#[unstable = "needs to be updated to use an iterator"]
|
||||
#[unstable(feature = "unnamed_feature", since = "1.0.0",
|
||||
reason = "needs to be updated to use an iterator")]
|
||||
pub fn escape_default<F>(c: u8, mut f: F) where
|
||||
F: FnMut(u8),
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user