Skip to content

Commit

Permalink
Rollup merge of rust-lang#115449 - scottmcm:stable-const-is-ascii, r=…
Browse files Browse the repository at this point in the history
…ChrisDenton

Const-stabilize `is_ascii`

Resolves rust-lang#111090

FCP completed in rust-lang#111090 (comment)
  • Loading branch information
fmease authored Sep 2, 2023
2 parents 1f3174e + 570c312 commit 43d963d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/slice/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 43d963d

Please sign in to comment.