@@ -11,10 +11,12 @@ if_chain! {
1111 // unimplemented: field checks
1212 if arms.len() == 1;
1313 if let ExprKind::Loop(ref body, ref label, LoopSource::ForLoop) = arms[0].body.node;
14- if let StmtKind::Local(ref local) = body.node;
14+ if let Some(trailing_expr) = &body.expr;
15+ if body.stmts.len() == 4;
16+ if let StmtKind::Local(ref local) = body.stmts[0].node;
1517 if let PatKind::Binding(BindingAnnotation::Mutable, _, name, None) = local.pat.node;
1618 if name.node.as_str() == "__next";
17- if let StmtKind::Expr(ref e, _) = local.pat .node
19+ if let StmtKind::Expr(ref e, _) = body.stmts[1] .node
1820 if let ExprKind::Match(ref expr2, ref arms1, MatchSource::ForLoopDesugar) = e.node;
1921 if let ExprKind::Call(ref func1, ref args1) = expr2.node;
2022 if let ExprKind::Path(ref path2) = func1.node;
@@ -38,15 +40,17 @@ if_chain! {
3840 if arms1[1].pats.len() == 1;
3941 if let PatKind::Path(ref path7) = arms1[1].pats[0].node;
4042 if match_qpath(path7, &["{{root}}", "std", "option", "Option", "None"]);
41- if let StmtKind::Local(ref local1) = path7 .node;
43+ if let StmtKind::Local(ref local1) = body.stmts[2] .node;
4244 if let Some(ref init) = local1.init;
4345 if let ExprKind::Path(ref path8) = init.node;
4446 if match_qpath(path8, &["__next"]);
4547 if let PatKind::Binding(BindingAnnotation::Unannotated, _, name1, None) = local1.pat.node;
4648 if name1.node.as_str() == "y";
47- if let StmtKind::Expr(ref e1, _) = local1.pat .node
49+ if let StmtKind::Expr(ref e1, _) = body.stmts[3] .node
4850 if let ExprKind::Block(ref block) = e1.node;
49- if let StmtKind::Local(ref local2) = block.node;
51+ if let Some(trailing_expr1) = &block.expr;
52+ if block.stmts.len() == 1;
53+ if let StmtKind::Local(ref local2) = block.stmts[0].node;
5054 if let Some(ref init1) = local2.init;
5155 if let ExprKind::Path(ref path9) = init1.node;
5256 if match_qpath(path9, &["y"]);
0 commit comments