about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2015-03-13 11:35:53 -0700
committerAaron Turon <aturon@mozilla.com>2015-03-13 14:45:13 -0700
commit1d5983aded687149239e8943debd51abdce5d27b (patch)
tree0ff9089b7e510e8d93c0c18e775ed315141d3b82 /src/libsyntax/parse
parentee7696383f3423cdd17373ff9e75c01acd8e3417 (diff)
downloadrust-1d5983aded687149239e8943debd51abdce5d27b.tar.gz
rust-1d5983aded687149239e8943debd51abdce5d27b.zip
Deprecate range, range_step, count, distributions
This commit deprecates the `count`, `range` and `range_step` functions
in `iter`, in favor of range notation. To recover all existing
functionality, a new `step_by` adapter is provided directly on `ops::Range`
and `ops::RangeFrom`.

[breaking-change]
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index ea1c1705514..f2ada490fad 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -77,7 +77,6 @@ use owned_slice::OwnedSlice;
 
 use std::collections::HashSet;
 use std::io::prelude::*;
-use std::iter;
 use std::mem;
 use std::num::Float;
 use std::path::{Path, PathBuf};
@@ -749,7 +748,7 @@ impl<'a> Parser<'a> {
         // would encounter a `>` and stop. This lets the parser handle trailing
         // commas in generic parameters, because it can stop either after
         // parsing a type or after parsing a comma.
-        for i in iter::count(0, 1) {
+        for i in 0.. {
             if self.check(&token::Gt)
                 || self.token == token::BinOp(token::Shr)
                 || self.token == token::Ge