Skip to content

Commit 24bb648

Browse files
committed
Auto merge of #31806 - gokhanettin:to_lowercase-doc, r=japaric
`to_lowercase` example mistakenly calls `to_uppercase` function. This fixes the example.
2 parents c92e910 + 84003cd commit 24bb648

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_unicode/char.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -776,13 +776,13 @@ impl char {
776776
/// Basic usage:
777777
///
778778
/// ```
779-
/// let c = 'c';
779+
/// let c = 'C';
780780
///
781-
/// assert_eq!(c.to_uppercase().next(), Some('C'));
781+
/// assert_eq!(c.to_lowercase().next(), Some('c'));
782782
///
783783
/// // Japanese scripts do not have case, and so:
784784
/// let c = '山';
785-
/// assert_eq!(c.to_uppercase().next(), Some('山'));
785+
/// assert_eq!(c.to_lowercase().next(), Some('山'));
786786
/// ```
787787
#[stable(feature = "rust1", since = "1.0.0")]
788788
#[inline]

0 commit comments

Comments
 (0)