about summary refs log tree commit diff
path: root/src/libsyntax/ast_map.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/ast_map.rs')
-rw-r--r--src/libsyntax/ast_map.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs
index d9a7543eed4..9b6c2947a3b 100644
--- a/src/libsyntax/ast_map.rs
+++ b/src/libsyntax/ast_map.rs
@@ -293,8 +293,10 @@ fn map_struct_def(struct_def: @ast::struct_def, parent_node: ast_node,
     }
     let d_id = ast_util::local_def(id);
     let p = extend(cx, ident);
-     // only need to handle methods
-    do vec::iter(struct_def.methods) |m| { map_method(d_id, p, m, cx); }
+    // only need to handle methods
+    for vec::each_ref(struct_def.methods) |m| {
+        map_method(d_id, p, *m, cx);
+    }
 }
 
 fn map_view_item(vi: @view_item, cx: ctx, _v: vt) {