Convert old-style for loops to new-style

Most could use the each method, but because of the hack used to
disambiguate old- and new-style loops, some had to use vec::each.

(This hack will go away soon.)

Issue #1619
This commit is contained in:
Marijn Haverbeke 2012-04-06 20:01:43 +02:00
parent 9c88e5ef5a
commit c902eafa14
99 changed files with 623 additions and 625 deletions

View file

@ -142,7 +142,7 @@ fn visit_ids(item: ast::inlined_item, vfn: fn@(ast::node_id)) {
vfn(i.id);
alt i.node {
ast::item_res(_, _, _, d_id, c_id) { vfn(d_id); vfn(c_id); }
ast::item_enum(vs, _) { for v in vs { vfn(v.node.id); } }
ast::item_enum(vs, _) { for vs.each {|v| vfn(v.node.id); } }
_ {}
}
},