about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-06-13 14:02:25 +0000
committerbors <bors@rust-lang.org>2015-06-13 14:02:25 +0000
commitb850046ca1474a2e6b7b039d5844616bbfa97015 (patch)
treeb58b6fccac19583095a3c5b8fd3203181c25b112
parenta27982623c12e759c0d8d8e53c5290b76351bdd3 (diff)
parent023f66103d5d245cfa6c900e13ef7f5f4dd80520 (diff)
downloadrust-b850046ca1474a2e6b7b039d5844616bbfa97015.tar.gz
rust-b850046ca1474a2e6b7b039d5844616bbfa97015.zip
Auto merge of #26272 - Manishearth:rollup, r=Manishearth
- Successful merges: #26255, #26256, #26257, #26259, #26260
- Failed merges: 
-rw-r--r--src/doc/trpl/associated-types.md2
-rw-r--r--src/doc/trpl/iterators.md11
-rw-r--r--src/doc/trpl/lifetimes.md2
-rw-r--r--src/librustc_unicode/char.rs26
4 files changed, 23 insertions, 18 deletions
diff --git a/src/doc/trpl/associated-types.md b/src/doc/trpl/associated-types.md
index ec96880f12a..fe4f27b9d95 100644
--- a/src/doc/trpl/associated-types.md
+++ b/src/doc/trpl/associated-types.md
@@ -43,7 +43,7 @@ trait Graph {
 Now, our clients can be abstract over a given `Graph`:
 
 ```rust,ignore
-fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> usize { ... }
+fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> u32 { ... }
 ```
 
 No need to deal with the `E`dge type here!
diff --git a/src/doc/trpl/iterators.md b/src/doc/trpl/iterators.md
index 249c1cc7e34..1c574f02091 100644
--- a/src/doc/trpl/iterators.md
+++ b/src/doc/trpl/iterators.md
@@ -285,8 +285,7 @@ has no side effect on the original iterator. Let's try it out with our infinite
 iterator from before:
 
 ```rust
-# #![feature(step_by)]
-for i in (1..).step_by(5).take(5) {
+for i in (1..).take(5) {
     println!("{}", i);
 }
 ```
@@ -295,10 +294,10 @@ This will print
 
 ```text
 1
-6
-11
-16
-21
+2
+3
+4
+5
 ```
 
 `filter()` is an adapter that takes a closure as an argument. This closure
diff --git a/src/doc/trpl/lifetimes.md b/src/doc/trpl/lifetimes.md
index 580960b7e80..11d651c5778 100644
--- a/src/doc/trpl/lifetimes.md
+++ b/src/doc/trpl/lifetimes.md
@@ -305,7 +305,7 @@ fn substr<'a>(s: &'a str, until: u32) -> &'a str; // expanded
 fn get_str() -> &str; // ILLEGAL, no inputs
 
 fn frob(s: &str, t: &str) -> &str; // ILLEGAL, two inputs
-fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is unclear
+fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is ambiguous
 
 fn get_mut(&mut self) -> &mut T; // elided
 fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded
diff --git a/src/librustc_unicode/char.rs b/src/librustc_unicode/char.rs
index 946a833b3f8..a7ced76e10c 100644
--- a/src/librustc_unicode/char.rs
+++ b/src/librustc_unicode/char.rs
@@ -187,22 +187,16 @@ impl char {
     /// # Examples
     ///
     /// ```
-    /// for i in '❤'.escape_unicode() {
-    ///     println!("{}", i);
+    /// for c in '❤'.escape_unicode() {
+    ///     print!("{}", c);
     /// }
+    /// println!("");
     /// ```
     ///
     /// This prints:
     ///
     /// ```text
-    /// \
-    /// u
-    /// {
-    /// 2
-    /// 7
-    /// 6
-    /// 4
-    /// }
+    /// \u{2764}
     /// ```
     ///
     /// Collecting into a `String`:
@@ -467,6 +461,12 @@ impl char {
     /// Returns an iterator which yields the characters corresponding to the
     /// lowercase equivalent of the character. If no conversion is possible then
     /// an iterator with just the input character is returned.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// assert_eq!(Some('c'), 'C'.to_lowercase().next());
+    /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
     pub fn to_lowercase(self) -> ToLowercase {
@@ -515,6 +515,12 @@ impl char {
     /// [`SpecialCasing.txt`]: ftp://ftp.unicode.org/Public/UNIDATA/SpecialCasing.txt
     ///
     /// [2]: http://www.unicode.org/versions/Unicode7.0.0/ch03.pdf#G33992
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// assert_eq!(Some('C'), 'c'.to_uppercase().next());
+    /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
     #[inline]
     pub fn to_uppercase(self) -> ToUppercase {