about summary refs log tree commit diff
path: root/src/doc/trpl
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-04-30 14:17:56 -0400
committerSteve Klabnik <steve@steveklabnik.com>2015-04-30 14:17:56 -0400
commit0b06fd70c85090c7fa5a0ce210374a5e209bbbc9 (patch)
tree3d3cc189f2243557486d2243aa9db32c7d96ad1e /src/doc/trpl
parent2f613bfaeb81ce25b116835a5f09750384b888c7 (diff)
downloadrust-0b06fd70c85090c7fa5a0ce210374a5e209bbbc9.tar.gz
rust-0b06fd70c85090c7fa5a0ce210374a5e209bbbc9.zip
Fix code sample, remove unstable code
Fixes #24977
Diffstat (limited to 'src/doc/trpl')
-rw-r--r--src/doc/trpl/iterators.md15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/doc/trpl/iterators.md b/src/doc/trpl/iterators.md
index eea575658b9..76f6a4243a0 100644
--- a/src/doc/trpl/iterators.md
+++ b/src/doc/trpl/iterators.md
@@ -235,7 +235,7 @@ Ranges are one of two basic iterators that you'll see. The other is `iter()`.
 in turn:
 
 ```rust
-let nums = [1, 2, 3];
+let nums = vec![1, 2, 3];
 
 for num in nums.iter() {
    println!("{}", num);
@@ -243,18 +243,7 @@ for num in nums.iter() {
 ```
 
 These two basic iterators should serve you well. There are some more
-advanced iterators, including ones that are infinite. Like using range syntax
-and `step_by`:
-
-```rust
-# #![feature(step_by)]
-(1..).step_by(5);
-```
-
-This iterator counts up from one, adding five each time. It will give
-you a new integer every time, forever (well, technically, until it reaches the
-maximum number representable by an `i32`). But since iterators are lazy,
-that's okay! You probably don't want to use `collect()` on it, though...
+advanced iterators, including ones that are infinite.
 
 That's enough about iterators. Iterator adapters are the last concept
 we need to talk about with regards to iterators. Let's get to it!