about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-09-19 16:55:01 -0700
committerNiko Matsakis <niko@alum.mit.edu>2012-09-19 17:03:01 -0700
commitcfed923600e2f7ad34241501200d595abccdeb54 (patch)
treed382eb144026703d9abee0e6a99b87b34e9bd138 /src/libsyntax/parse
parent1c39f1968c77a3d42b0fdb30a36cff4d94a17da2 (diff)
downloadrust-cfed923600e2f7ad34241501200d595abccdeb54.tar.gz
rust-cfed923600e2f7ad34241501200d595abccdeb54.zip
demode the each() method on vec and other iterables.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/eval.rs2
-rw-r--r--src/libsyntax/parse/parser.rs8
-rw-r--r--src/libsyntax/parse/token.rs6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/parse/eval.rs b/src/libsyntax/parse/eval.rs
index 526b5101d34..c5e64654d7b 100644
--- a/src/libsyntax/parse/eval.rs
+++ b/src/libsyntax/parse/eval.rs
@@ -13,7 +13,7 @@ fn eval_crate_directives(cx: ctx,
                          &view_items: ~[@ast::view_item],
                          &items: ~[@ast::item]) {
     for cdirs.each |sub_cdir| {
-        eval_crate_directive(cx, sub_cdir, prefix, view_items, items);
+        eval_crate_directive(cx, *sub_cdir, prefix, view_items, items);
     }
 }
 
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 0902567e864..a1c1208d21c 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2244,7 +2244,7 @@ impl parser {
                                             IMPORTS_AND_ITEMS_ALLOWED);
 
         for items.each |item| {
-            let decl = @spanned(item.span.lo, item.span.hi, decl_item(item));
+            let decl = @spanned(item.span.lo, item.span.hi, decl_item(*item));
             push(stmts, @spanned(item.span.lo, item.span.hi,
                                  stmt_decl(decl, self.get_id())));
         }
@@ -2699,7 +2699,7 @@ impl parser {
                   }
                   members(mms) => {
                     for mms.each |mm| {
-                        match mm {
+                        match *mm {
                             @field_member(struct_field) =>
                                 vec::push(fields, struct_field),
                             @method_member(the_method_member) =>
@@ -3090,7 +3090,7 @@ impl parser {
                 }
                 members(mms) => {
                     for mms.each |mm| {
-                        match mm {
+                        match *mm {
                             @field_member(struct_field) =>
                                 vec::push(fields, struct_field),
                             @method_member(the_method_member) =>
@@ -3163,7 +3163,7 @@ impl parser {
                         seq_sep_trailing_disallowed(token::COMMA),
                         |p| p.parse_ty(false));
                     for arg_tys.each |ty| {
-                        vec::push(args, {ty: ty, id: self.get_id()});
+                        vec::push(args, {ty: *ty, id: self.get_id()});
                     }
                     kind = tuple_variant_kind(args);
                 } else if self.eat(token::EQ) {
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 2bd5d155063..570915e657f 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -389,7 +389,7 @@ fn temporary_keyword_table() -> HashMap<~str, ()> {
         ~"self", ~"static",
     ];
     for keys.each |word| {
-        words.insert(word, ());
+        words.insert(*word, ());
     }
     words
 }
@@ -415,7 +415,7 @@ fn strict_keyword_table() -> HashMap<~str, ()> {
         ~"while"
     ];
     for keys.each |word| {
-        words.insert(word, ());
+        words.insert(*word, ());
     }
     words
 }
@@ -426,7 +426,7 @@ fn reserved_keyword_table() -> HashMap<~str, ()> {
         ~"be"
     ];
     for keys.each |word| {
-        words.insert(word, ());
+        words.insert(*word, ());
     }
     words
 }