Mark ascii methods on primitive types stable in 1.23.0.
The ascii_methods_on_intrinsics feature stabilization didn't land in time for 1.21.0. Update the annotation so the documentation is correct about when these methods became available.
This commit is contained in:
parent
9053fdd411
commit
6aef5e3b2e
4 changed files with 24 additions and 24 deletions
|
@ -2078,7 +2078,7 @@ impl str {
|
|||
/// assert!(ascii.is_ascii());
|
||||
/// assert!(!non_ascii.is_ascii());
|
||||
/// ```
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||
#[inline]
|
||||
pub fn is_ascii(&self) -> bool {
|
||||
// We can treat each byte as character here: all multibyte characters
|
||||
|
@ -2108,7 +2108,7 @@ impl str {
|
|||
///
|
||||
/// [`make_ascii_uppercase`]: #method.make_ascii_uppercase
|
||||
/// [`to_uppercase`]: #method.to_uppercase
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||
#[inline]
|
||||
pub fn to_ascii_uppercase(&self) -> String {
|
||||
let mut bytes = self.as_bytes().to_vec();
|
||||
|
@ -2138,7 +2138,7 @@ impl str {
|
|||
///
|
||||
/// [`make_ascii_lowercase`]: #method.make_ascii_lowercase
|
||||
/// [`to_lowercase`]: #method.to_lowercase
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||
#[inline]
|
||||
pub fn to_ascii_lowercase(&self) -> String {
|
||||
let mut bytes = self.as_bytes().to_vec();
|
||||
|
@ -2159,7 +2159,7 @@ impl str {
|
|||
/// assert!("Ferrös".eq_ignore_ascii_case("FERRöS"));
|
||||
/// assert!(!"Ferrös".eq_ignore_ascii_case("FERRÖS"));
|
||||
/// ```
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||
#[inline]
|
||||
pub fn eq_ignore_ascii_case(&self, other: &str) -> bool {
|
||||
self.as_bytes().eq_ignore_ascii_case(other.as_bytes())
|
||||
|
@ -2174,7 +2174,7 @@ impl str {
|
|||
/// [`to_ascii_uppercase`].
|
||||
///
|
||||
/// [`to_ascii_uppercase`]: #method.to_ascii_uppercase
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||
pub fn make_ascii_uppercase(&mut self) {
|
||||
let me = unsafe { self.as_bytes_mut() };
|
||||
me.make_ascii_uppercase()
|
||||
|
@ -2189,7 +2189,7 @@ impl str {
|
|||
/// [`to_ascii_lowercase`].
|
||||
///
|
||||
/// [`to_ascii_lowercase`]: #method.to_ascii_lowercase
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.21.0")]
|
||||
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
|
||||
pub fn make_ascii_lowercase(&mut self) {
|
||||
let me = unsafe { self.as_bytes_mut() };
|
||||
me.make_ascii_lowercase()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue