about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-02-22 01:07:07 +0000
committerbors <bors@rust-lang.org>2016-02-22 01:07:07 +0000
commit24bb648d8442a636bbe2cb6f06bb2b43d2e14bab (patch)
tree17a9c0c31eabd49937ac1b7e77598bfc081dc1d4 /src
parentc92e910c117775563a6a8782db16a15215061bc1 (diff)
parent84003cda1fff00368438fa6387e8469e7eac10bb (diff)
downloadrust-24bb648d8442a636bbe2cb6f06bb2b43d2e14bab.tar.gz
rust-24bb648d8442a636bbe2cb6f06bb2b43d2e14bab.zip
Auto merge of #31806 - gokhanettin:to_lowercase-doc, r=japaric
`to_lowercase` example mistakenly calls `to_uppercase` function. This fixes the example.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_unicode/char.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_unicode/char.rs b/src/librustc_unicode/char.rs
index 9386453d660..a489b4991f4 100644
--- a/src/librustc_unicode/char.rs
+++ b/src/librustc_unicode/char.rs
@@ -776,13 +776,13 @@ impl char {
     /// Basic usage:
     ///
     /// ```
-    /// let c = 'c';
+    /// let c = 'C';
     ///
-    /// assert_eq!(c.to_uppercase().next(), Some('C'));
+    /// assert_eq!(c.to_lowercase().next(), Some('c'));
     ///
     /// // Japanese scripts do not have case, and so:
     /// let c = '山';
-    /// assert_eq!(c.to_uppercase().next(), Some('山'));
+    /// assert_eq!(c.to_lowercase().next(), Some('山'));
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]