Skip to content

Commit 2f615a1

Browse files
authored
Rollup merge of rust-lang#132948 - RalfJung:const_unicode_case_lookup, r=Noratrieb
stabilize const_unicode_case_lookup Fixes rust-lang#101400 See there for t-libs-api FCP
2 parents f00e091 + 7fafe99 commit 2f615a1

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

core/src/char/methods.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -775,13 +775,12 @@ impl char {
775775
/// In a const context:
776776
///
777777
/// ```
778-
/// #![feature(const_unicode_case_lookup)]
779778
/// const CAPITAL_DELTA_IS_LOWERCASE: bool = 'Δ'.is_lowercase();
780779
/// assert!(!CAPITAL_DELTA_IS_LOWERCASE);
781780
/// ```
782781
#[must_use]
783782
#[stable(feature = "rust1", since = "1.0.0")]
784-
#[rustc_const_unstable(feature = "const_unicode_case_lookup", issue = "101400")]
783+
#[rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0")]
785784
#[inline]
786785
pub const fn is_lowercase(self) -> bool {
787786
match self {
@@ -817,13 +816,12 @@ impl char {
817816
/// In a const context:
818817
///
819818
/// ```
820-
/// #![feature(const_unicode_case_lookup)]
821819
/// const CAPITAL_DELTA_IS_UPPERCASE: bool = 'Δ'.is_uppercase();
822820
/// assert!(CAPITAL_DELTA_IS_UPPERCASE);
823821
/// ```
824822
#[must_use]
825823
#[stable(feature = "rust1", since = "1.0.0")]
826-
#[rustc_const_unstable(feature = "const_unicode_case_lookup", issue = "101400")]
824+
#[rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0")]
827825
#[inline]
828826
pub const fn is_uppercase(self) -> bool {
829827
match self {

core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@
134134
#![feature(const_type_name)]
135135
#![feature(const_typed_swap)]
136136
#![feature(const_ub_checks)]
137-
#![feature(const_unicode_case_lookup)]
138137
#![feature(core_intrinsics)]
139138
#![feature(coverage_attribute)]
140139
#![feature(do_not_recommend)]

core/src/unicode/unicode_data.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
///! This file is generated by `./x run src/tools/unicode-table-generator`; do not edit manually!
22
33
#[inline(always)]
4+
#[cfg_attr(bootstrap, rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0"))]
45
const fn bitset_search<
56
const N: usize,
67
const CHUNK_SIZE: usize,
@@ -423,6 +424,7 @@ pub mod lowercase {
423424
(5, 187), (6, 78), (7, 132),
424425
];
425426

427+
#[cfg_attr(bootstrap, rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0"))]
426428
pub const fn lookup(c: char) -> bool {
427429
super::bitset_search(
428430
c as u32,
@@ -547,6 +549,7 @@ pub mod uppercase {
547549
(2, 146), (2, 20), (3, 146), (3, 140), (3, 134), (4, 178), (4, 171),
548550
];
549551

552+
#[cfg_attr(bootstrap, rustc_const_stable(feature = "const_unicode_case_lookup", since = "1.84.0"))]
550553
pub const fn lookup(c: char) -> bool {
551554
super::bitset_search(
552555
c as u32,

0 commit comments

Comments
 (0)