Skip to content

Commit 7ac6b58

Browse files
committed
Mark str::to_uppercase and str::to_lowercase as stable.
1 parent f901086 commit 7ac6b58

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/libcollections/str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ impl str {
18511851
/// let s = "HELLO";
18521852
/// assert_eq!(s.to_lowercase(), "hello");
18531853
/// ```
1854-
#[unstable(feature = "collections")]
1854+
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
18551855
pub fn to_lowercase(&self) -> String {
18561856
let mut s = String::with_capacity(self.len());
18571857
for (i, c) in self[..].char_indices() {
@@ -1892,7 +1892,7 @@ impl str {
18921892
/// let s = "hello";
18931893
/// assert_eq!(s.to_uppercase(), "HELLO");
18941894
/// ```
1895-
#[unstable(feature = "collections")]
1895+
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
18961896
pub fn to_uppercase(&self) -> String {
18971897
let mut s = String::with_capacity(self.len());
18981898
s.extend(self[..].chars().flat_map(|c| c.to_uppercase()));

src/librustc_unicode/char.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ impl Iterator for ToUppercase {
7070
/// An iterator over the titlecase mapping of a given character, returned from
7171
/// the [`to_titlecase` method](../primitive.char.html#method.to_titlecase) on
7272
/// characters.
73-
#[stable(feature = "char_to_titlecase", since = "1.2.0")]
73+
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
7474
pub struct ToTitlecase(CaseMappingIter);
7575

76-
#[stable(feature = "char_to_titlecase", since = "1.2.0")]
76+
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
7777
impl Iterator for ToTitlecase {
7878
type Item = char;
7979
fn next(&mut self) -> Option<char> { self.0.next() }
@@ -481,7 +481,7 @@ impl char {
481481
/// Returns an iterator which yields the characters corresponding to the
482482
/// lowercase equivalent of the character. If no conversion is possible then
483483
/// an iterator with just the input character is returned.
484-
#[stable(feature = "char_to_titlecase", since = "1.2.0")]
484+
#[stable(feature = "unicode_case_mapping", since = "1.2.0")]
485485
#[inline]
486486
pub fn to_titlecase(self) -> ToTitlecase {
487487
ToTitlecase(CaseMappingIter::new(conversions::to_title(self)))

0 commit comments

Comments
 (0)