diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-09-02 07:48:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-02 07:48:23 +0200 |
| commit | 1bbd307349482135e698d22e9d2b353f9a16224e (patch) | |
| tree | adcb71256ce0225800ef2d831c125b5f250cd803 | |
| parent | cdc8aa3843ca74ea77b2f295d65c0c6e80fc3d56 (diff) | |
| parent | 570c312bc51b6da89ec87199c9349e3e14a32f54 (diff) | |
| download | rust-1bbd307349482135e698d22e9d2b353f9a16224e.tar.gz rust-1bbd307349482135e698d22e9d2b353f9a16224e.zip | |
Rollup merge of #115449 - scottmcm:stable-const-is-ascii, r=ChrisDenton
Const-stabilize `is_ascii` Resolves #111090 FCP completed in https://github.com/rust-lang/rust/issues/111090#issuecomment-1688490049
| -rw-r--r-- | library/core/src/lib.rs | 1 | ||||
| -rw-r--r-- | library/core/src/slice/ascii.rs | 2 | ||||
| -rw-r--r-- | library/core/src/str/mod.rs | 2 |
3 files changed, 2 insertions, 3 deletions
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index f39c4176440..b97cb652076 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -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)] diff --git a/library/core/src/slice/ascii.rs b/library/core/src/slice/ascii.rs index f3311f76a7f..5dc53caba0d 100644 --- a/library/core/src/slice/ascii.rs +++ b/library/core/src/slice/ascii.rs @@ -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 { diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index 23cebdb6c3b..d5b0ab92c09 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -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 { |
