Promote char::is_case_ignorable from perma-unstable to unstable

This commit is contained in:
Jules Bertholet
2026-03-31 22:09:52 -04:00
parent 48cc71ee88
commit c88ef81131
2 changed files with 9 additions and 6 deletions
+1
View File
@@ -93,6 +93,7 @@
#![feature(async_iterator)]
#![feature(bstr)]
#![feature(bstr_internals)]
#![feature(case_ignorable)]
#![feature(cast_maybe_uninit)]
#![feature(cell_get_cloned)]
#![feature(char_internals)]
+8 -6
View File
@@ -1074,18 +1074,20 @@ pub(crate) fn is_grapheme_extended(self) -> bool {
self > '\u{02FF}' && unicode::Grapheme_Extend(self)
}
/// Returns `true` if this `char` has the `Case_Ignorable` property.
/// Returns `true` if this `char` has the `Case_Ignorable` property. This narrow-use property
/// is used to implement context-dependent casing for the Greek letter sigma (uppercase Σ),
/// which has two lowercase forms.
///
/// `Case_Ignorable` is described in Chapter 4 (Character Properties) of the [Unicode Standard] and
/// specified in the [Unicode Character Database][ucd] [`DerivedCoreProperties.txt`].
/// `Case_Ignorable` is [described][D136] in Chapter 3 (Conformance) of the Unicode Core Specification,
/// and specified in the [Unicode Character Database][ucd] [`DerivedCoreProperties.txt`];
/// see those resources for more information.
///
/// [Unicode Standard]: https://www.unicode.org/versions/latest/
/// [D136]: https://www.unicode.org/versions/latest/core-spec/chapter-3/#G63116
/// [ucd]: https://www.unicode.org/reports/tr44/
/// [`DerivedCoreProperties.txt`]: https://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt
#[must_use]
#[inline]
#[doc(hidden)]
#[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")]
#[unstable(feature = "case_ignorable", issue = "154848")]
pub fn is_case_ignorable(self) -> bool {
if self.is_ascii() {
matches!(self, '\'' | '.' | ':' | '^' | '`')