about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-01-26 13:26:08 +0000
committerbors <bors@rust-lang.org>2016-01-26 13:26:08 +0000
commit5d6e8fcedac1184a28031ee0cf63e2d862e4536f (patch)
tree73ca828212a1d995b4cab760b207964f9c6e8231 /src/libcore
parent43c1a173a874f5513db58b2f5321489a00087484 (diff)
parentb6faae11f46b18221555759d3e6fad12cbd0ee97 (diff)
downloadrust-5d6e8fcedac1184a28031ee0cf63e2d862e4536f.tar.gz
rust-5d6e8fcedac1184a28031ee0cf63e2d862e4536f.zip
Auto merge of #31214 - Manishearth:rollup, r=Manishearth
- Successful merges: #31172, #31177, #31211
- Failed merges:
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/iter.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index ddc4fb32cde..3f1c0f6a549 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -4252,13 +4252,15 @@ impl<A: Step> RangeFrom<A> {
     ///
     /// # Examples
     ///
-    /// ```ignore
-    /// for i in (0u8..).step_by(2) {
+    /// ```
+    /// # #![feature(step_by)]
+    ///
+    /// for i in (0u8..).step_by(2).take(10) {
     ///     println!("{}", i);
     /// }
     /// ```
     ///
-    /// This prints all even `u8` values.
+    /// This prints the first ten even natural integers (0 to 18).
     #[unstable(feature = "step_by", reason = "recent addition",
                issue = "27741")]
     pub fn step_by(self, by: A) -> StepBy<A, Self> {