Skip to content

Commit 07b0923

Browse files
authored
Unrolled build for #154849
Rollup merge of #154849 - Jules-Bertholet:case-ignorable, r=Mark-Simulacrum Promote `char::is_case_ignorable` from perma-unstable to unstable (Take two of #154658, which was closed when GitHub Codespaces somehow managed to squash the entire commit history of rust-lang/rust into one commit) This function is currently used in the implementation of `str::to_lowercase()`. There is no reason to restrict it to the stdlib, though. Reimplementations of string casing for types other than `str` -> `String` shouldn't need to waste space with a duplicate copy of this table. @rustbot label A-unicode T-libs-api r? @Mark-Simulacrum
2 parents c2efcc4 + c88ef81 commit 07b0923

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

library/alloc/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
#![feature(async_iterator)]
9494
#![feature(bstr)]
9595
#![feature(bstr_internals)]
96+
#![feature(case_ignorable)]
9697
#![feature(cast_maybe_uninit)]
9798
#![feature(cell_get_cloned)]
9899
#![feature(char_internals)]

library/core/src/char/methods.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,18 +1074,20 @@ impl char {
10741074
self > '\u{02FF}' && unicode::Grapheme_Extend(self)
10751075
}
10761076

1077-
/// Returns `true` if this `char` has the `Case_Ignorable` property.
1077+
/// Returns `true` if this `char` has the `Case_Ignorable` property. This narrow-use property
1078+
/// is used to implement context-dependent casing for the Greek letter sigma (uppercase Σ),
1079+
/// which has two lowercase forms.
10781080
///
1079-
/// `Case_Ignorable` is described in Chapter 4 (Character Properties) of the [Unicode Standard] and
1080-
/// specified in the [Unicode Character Database][ucd] [`DerivedCoreProperties.txt`].
1081+
/// `Case_Ignorable` is [described][D136] in Chapter 3 (Conformance) of the Unicode Core Specification,
1082+
/// and specified in the [Unicode Character Database][ucd] [`DerivedCoreProperties.txt`];
1083+
/// see those resources for more information.
10811084
///
1082-
/// [Unicode Standard]: https://www.unicode.org/versions/latest/
1085+
/// [D136]: https://www.unicode.org/versions/latest/core-spec/chapter-3/#G63116
10831086
/// [ucd]: https://www.unicode.org/reports/tr44/
10841087
/// [`DerivedCoreProperties.txt`]: https://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt
10851088
#[must_use]
10861089
#[inline]
1087-
#[doc(hidden)]
1088-
#[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")]
1090+
#[unstable(feature = "case_ignorable", issue = "154848")]
10891091
pub fn is_case_ignorable(self) -> bool {
10901092
if self.is_ascii() {
10911093
matches!(self, '\'' | '.' | ':' | '^' | '`')

0 commit comments

Comments
 (0)