about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast_util.rs2
-rw-r--r--src/libsyntax/diagnostic.rs2
-rw-r--r--src/libsyntax/print/pprust.rs12
-rw-r--r--src/libsyntax/visit.rs12
4 files changed, 14 insertions, 14 deletions
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index b5ccef8eae0..680101e673c 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -537,7 +537,7 @@ pub fn walk_pat(pat: @pat, it: fn(@pat)) {
             for elts.each |p| {
                 walk_pat(*p, it)
             }
-            do tail.iter |tail| {
+            for tail.each |tail| {
                 walk_pat(*tail, it)
             }
         }
diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs
index a83dfa5538d..e9ea5deda3f 100644
--- a/src/libsyntax/diagnostic.rs
+++ b/src/libsyntax/diagnostic.rs
@@ -294,7 +294,7 @@ fn highlight_lines(cm: @codemap::CodeMap,
 }
 
 fn print_macro_backtrace(cm: @codemap::CodeMap, sp: span) {
-    do option::iter(&sp.expn_info) |ei| {
+    for sp.expn_info.each |ei| {
         let ss = option::map_default(&ei.callee.span, @~"",
                                      |span| @cm.span_to_str(*span));
         print_diagnostic(*ss, note,
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index ab65134fd00..24110125262 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -732,7 +732,7 @@ pub fn print_struct(s: @ps,
         nbsp(s);
         bopen(s);
         hardbreak_if_not_bol(s);
-        do struct_def.dtor.iter |dtor| {
+        for struct_def.dtor.each |dtor| {
           hardbreak_if_not_bol(s);
           maybe_print_comment(s, dtor.span.lo);
           print_outer_attributes(s, dtor.node.attrs);
@@ -1271,10 +1271,10 @@ pub fn print_expr(s: @ps, &&expr: @ast::expr) {
       ast::expr_loop(ref blk, opt_ident) => {
         head(s, ~"loop");
         space(s.s);
-        opt_ident.iter(|ident| {
+        for opt_ident.each |ident| {
             print_ident(s, *ident);
             word_space(s, ~":");
-        });
+        }
         print_block(s, blk);
       }
       ast::expr_match(expr, ref arms) => {
@@ -1422,12 +1422,12 @@ pub fn print_expr(s: @ps, &&expr: @ast::expr) {
       ast::expr_break(opt_ident) => {
         word(s.s, ~"break");
         space(s.s);
-        opt_ident.iter(|ident| {print_ident(s, *ident); space(s.s)});
+        for opt_ident.each |ident| { print_ident(s, *ident); space(s.s) }
       }
       ast::expr_again(opt_ident) => {
         word(s.s, ~"loop");
         space(s.s);
-        opt_ident.iter(|ident| {print_ident(s, *ident); space(s.s)});
+        for opt_ident.each |ident| { print_ident(s, *ident); space(s.s) }
       }
       ast::expr_ret(result) => {
         word(s.s, ~"return");
@@ -1667,7 +1667,7 @@ pub fn print_pat(s: @ps, &&pat: @ast::pat, refutable: bool) {
       ast::pat_vec(elts, tail) => {
         word(s.s, ~"[");
         commasep(s, inconsistent, elts, |s, p| print_pat(s, p, refutable));
-        do option::iter(&tail) |tail| {
+        for tail.each |tail| {
             if vec::len(elts) != 0u { word_space(s, ~","); }
             word(s.s, ~"..");
             print_pat(s, *tail, refutable);
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs
index bd60be766fb..4cc97dad97c 100644
--- a/src/libsyntax/visit.rs
+++ b/src/libsyntax/visit.rs
@@ -220,7 +220,7 @@ pub fn visit_enum_def<E>(enum_definition: ast::enum_def,
             }
         }
         // Visit the disr expr if it exists
-        vr.node.disr_expr.iter(|ex| (v.visit_expr)(*ex, e, v));
+        for vr.node.disr_expr.each |ex| { (v.visit_expr)(*ex, e, v) }
     }
 }
 
@@ -264,7 +264,7 @@ pub fn visit_pat<E>(p: @pat, e: E, v: vt<E>) {
     match p.node {
         pat_enum(path, ref children) => {
             visit_path(path, e, v);
-            do children.iter |children| {
+            for children.each |children| {
                 for children.each |child| { (v.visit_pat)(*child, e, v); }
             }
         }
@@ -289,7 +289,7 @@ pub fn visit_pat<E>(p: @pat, e: E, v: vt<E>) {
         },
         pat_ident(_, path, ref inner) => {
             visit_path(path, e, v);
-            do inner.iter |subpat| { (v.visit_pat)(*subpat, e, v) }
+            for inner.each |subpat| { (v.visit_pat)(*subpat, e, v) }
         }
         pat_lit(ex) => (v.visit_expr)(ex, e, v),
         pat_range(e1, e2) => {
@@ -301,7 +301,7 @@ pub fn visit_pat<E>(p: @pat, e: E, v: vt<E>) {
             for elts.each |elt| {
                 (v.visit_pat)(*elt, e, v);
             }
-            do tail.iter |tail| {
+            for tail.each |tail| {
                 (v.visit_pat)(*tail, e, v);
             }
         }
@@ -415,7 +415,7 @@ pub fn visit_struct_def<E>(
     for sd.fields.each |f| {
         (v.visit_struct_field)(*f, e, v);
     }
-    do sd.dtor.iter |dtor| {
+    for sd.dtor.each |dtor| {
         visit_struct_dtor_helper(
             *dtor,
             generics,
@@ -423,7 +423,7 @@ pub fn visit_struct_def<E>(
             e,
             v
         )
-    };
+    }
 }
 
 pub fn visit_struct_field<E>(sf: @struct_field, e: E, v: vt<E>) {