about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-26 15:46:12 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-29 07:47:37 -0500
commit7d661af9c86566088f7dbaeee25143ecde673b75 (patch)
tree54aa9b410d06064bdc893f034e1b86921698aea9 /src/libsyntax/ext
parentc300d681bd2e901ef39591bbfb1ea4568ac6be70 (diff)
downloadrust-7d661af9c86566088f7dbaeee25143ecde673b75.tar.gz
rust-7d661af9c86566088f7dbaeee25143ecde673b75.zip
`for x in range(a, b)` -> `for x in a..b`
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/tt/macro_parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index 993d9000ae1..a718cc597c4 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -339,7 +339,7 @@ pub fn parse(sess: &ParseSess,
                         // most of the time.
 
                         // Only touch the binders we have actually bound
-                        for idx in range(ei.match_lo, ei.match_hi) {
+                        for idx in ei.match_lo..ei.match_hi {
                             let sub = (ei.matches[idx]).clone();
                             (&mut new_pos.matches[idx])
                                    .push(Rc::new(MatchedSeq(sub, mk_sp(ei.sp_lo,
@@ -385,7 +385,7 @@ pub fn parse(sess: &ParseSess,
                             new_ei.match_cur += seq.num_captures;
                             new_ei.idx += 1us;
                             //we specifically matched zero repeats.
-                            for idx in range(ei.match_cur, ei.match_cur + seq.num_captures) {
+                            for idx in ei.match_cur..ei.match_cur + seq.num_captures {
                                 (&mut new_ei.matches[idx]).push(Rc::new(MatchedSeq(vec![], sp)));
                             }
 
@@ -495,7 +495,7 @@ pub fn parse(sess: &ParseSess,
                 }
                 cur_eis.push(ei);
 
-                for _ in range(0, rust_parser.tokens_consumed) {
+                for _ in 0..rust_parser.tokens_consumed {
                     let _ = rdr.next_token();
                 }
             }