Skip to content

Commit

Permalink
Restore if lets replaced with fors
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Sep 29, 2015
1 parent 4744d56 commit 4764d98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/librustc_front/visit.rs
Expand Up @@ -336,7 +336,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
walk_list!(visitor, visit_lifetime_def, &function_declaration.lifetimes);
}
TyPath(ref maybe_qself, ref path) => {
for qself in maybe_qself {
if let Some(ref qself) = *maybe_qself {
visitor.visit_ty(&qself.ty);
}
visitor.visit_path(path, typ.id);
Expand Down Expand Up @@ -408,7 +408,7 @@ pub fn walk_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v Pat) {
match pattern.node {
PatEnum(ref path, ref opt_children) => {
visitor.visit_path(path, pattern.id);
for children in opt_children {
if let Some(ref children) = *opt_children {
walk_list!(visitor, visit_pat, children);
}
}
Expand Down Expand Up @@ -723,7 +723,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
walk_list!(visitor, visit_expr, end);
}
ExprPath(ref maybe_qself, ref path) => {
for qself in maybe_qself {
if let Some(ref qself) = *maybe_qself {
visitor.visit_ty(&qself.ty);
}
visitor.visit_path(path, expression.id)
Expand Down
6 changes: 3 additions & 3 deletions src/libsyntax/visit.rs
Expand Up @@ -353,7 +353,7 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
walk_list!(visitor, visit_lifetime_def, &function_declaration.lifetimes);
}
TyPath(ref maybe_qself, ref path) => {
for qself in maybe_qself {
if let Some(ref qself) = *maybe_qself {
visitor.visit_ty(&qself.ty);
}
visitor.visit_path(path, typ.id);
Expand Down Expand Up @@ -428,7 +428,7 @@ pub fn walk_pat<'v, V: Visitor<'v>>(visitor: &mut V, pattern: &'v Pat) {
match pattern.node {
PatEnum(ref path, ref opt_children) => {
visitor.visit_path(path, pattern.id);
for children in opt_children {
if let Some(ref children) = *opt_children {
walk_list!(visitor, visit_pat, children);
}
}
Expand Down Expand Up @@ -767,7 +767,7 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr) {
walk_list!(visitor, visit_expr, end);
}
ExprPath(ref maybe_qself, ref path) => {
for qself in maybe_qself {
if let Some(ref qself) = *maybe_qself {
visitor.visit_ty(&qself.ty);
}
visitor.visit_path(path, expression.id)
Expand Down

0 comments on commit 4764d98

Please sign in to comment.