about summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
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/parse/mod.rs
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/parse/mod.rs')
-rw-r--r--src/libsyntax/parse/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs
index 4bd476885a0..7834fae6276 100644
--- a/src/libsyntax/parse/mod.rs
+++ b/src/libsyntax/parse/mod.rs
@@ -472,7 +472,7 @@ pub fn str_lit(lit: &str) -> String {
                         } else {
                             // otherwise, a normal escape
                             let (c, n) = char_lit(&lit[i..]);
-                            for _ in range(0, n - 1) { // we don't need to move past the first \
+                            for _ in 0..n - 1 { // we don't need to move past the first \
                                 chars.next();
                             }
                             res.push(c);
@@ -635,7 +635,7 @@ pub fn binary_lit(lit: &str) -> Rc<Vec<u8>> {
                         // otherwise, a normal escape
                         let (c, n) = byte_lit(&lit[i..]);
                         // we don't need to move past the first \
-                        for _ in range(0, n - 1) {
+                        for _ in 0..n - 1 {
                             chars.next();
                         }
                         res.push(c);