diff options
| author | bors <bors@rust-lang.org> | 2015-03-16 17:02:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-16 17:02:11 +0000 |
| commit | bde09eea35113f25d4e0bcc4a8344de971f3069a (patch) | |
| tree | 91bf41d6d8d7630d193f517d0f22c9fe85e4f967 /src/libsyntax/parse | |
| parent | cc789193e11ab2d864db3186aa1961283b3d4cdc (diff) | |
| parent | 1d5983aded687149239e8943debd51abdce5d27b (diff) | |
| download | rust-bde09eea35113f25d4e0bcc4a8344de971f3069a.tar.gz rust-bde09eea35113f25d4e0bcc4a8344de971f3069a.zip | |
Auto merge of #23347 - aturon:stab-misc, r=alexcrichton
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] r? @alexcrichton
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 3 |
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 |
