Const-stabilize is_ascii

This commit is contained in:
Scott McMurray 2023-09-01 11:02:09 -07:00
parent 22d41ae90f
commit 570c312bc5
3 changed files with 2 additions and 3 deletions

View File

@ -152,7 +152,6 @@
#![feature(const_slice_from_raw_parts_mut)]
#![feature(const_slice_from_ref)]
#![feature(const_slice_index)]
#![feature(const_slice_is_ascii)]
#![feature(const_slice_ptr_len)]
#![feature(const_slice_split_at_mut)]
#![feature(const_str_from_utf8_unchecked_mut)]

View File

@ -10,7 +10,7 @@ use crate::ops;
impl [u8] {
/// Checks if all bytes in this slice are within the ASCII range.
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
#[rustc_const_unstable(feature = "const_slice_is_ascii", issue = "111090")]
#[rustc_const_stable(feature = "const_slice_is_ascii", since = "CURRENT_RUSTC_VERSION")]
#[must_use]
#[inline]
pub const fn is_ascii(&self) -> bool {

View File

@ -2322,7 +2322,7 @@ impl str {
/// assert!(!non_ascii.is_ascii());
/// ```
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
#[rustc_const_unstable(feature = "const_slice_is_ascii", issue = "111090")]
#[rustc_const_stable(feature = "const_slice_is_ascii", since = "CURRENT_RUSTC_VERSION")]
#[must_use]
#[inline]
pub const fn is_ascii(&self) -> bool {