demode the each() method on vec and other iterables.

This commit is contained in:
Niko Matsakis
2012-09-19 16:55:01 -07:00
parent 1c39f1968c
commit cfed923600
110 changed files with 483 additions and 456 deletions

View File

@@ -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);
}
}

View File

@@ -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) {

View File

@@ -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
}