Skip to content

Commit 43d963d

Browse files
authored
Rollup merge of rust-lang#115449 - scottmcm:stable-const-is-ascii, r=ChrisDenton
Const-stabilize `is_ascii` Resolves rust-lang#111090 FCP completed in rust-lang#111090 (comment)
2 parents 1f3174e + 570c312 commit 43d963d

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

library/core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
#![feature(const_slice_from_raw_parts_mut)]
153153
#![feature(const_slice_from_ref)]
154154
#![feature(const_slice_index)]
155-
#![feature(const_slice_is_ascii)]
156155
#![feature(const_slice_ptr_len)]
157156
#![feature(const_slice_split_at_mut)]
158157
#![feature(const_str_from_utf8_unchecked_mut)]

library/core/src/slice/ascii.rs

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

library/core/src/str/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2322,7 +2322,7 @@ impl str {
23222322
/// assert!(!non_ascii.is_ascii());
23232323
/// ```
23242324
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
2325-
#[rustc_const_unstable(feature = "const_slice_is_ascii", issue = "111090")]
2325+
#[rustc_const_stable(feature = "const_slice_is_ascii", since = "CURRENT_RUSTC_VERSION")]
23262326
#[must_use]
23272327
#[inline]
23282328
pub const fn is_ascii(&self) -> bool {

0 commit comments

Comments
 (0)