@@ -11,10 +11,12 @@ if_chain! {
11
11
// unimplemented: field checks
12
12
if arms.len() == 1;
13
13
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;
15
17
if let PatKind::Binding(BindingAnnotation::Mutable, _, name, None) = local.pat.node;
16
18
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
18
20
if let ExprKind::Match(ref expr2, ref arms1, MatchSource::ForLoopDesugar) = e.node;
19
21
if let ExprKind::Call(ref func1, ref args1) = expr2.node;
20
22
if let ExprKind::Path(ref path2) = func1.node;
@@ -38,15 +40,17 @@ if_chain! {
38
40
if arms1[1].pats.len() == 1;
39
41
if let PatKind::Path(ref path7) = arms1[1].pats[0].node;
40
42
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;
42
44
if let Some(ref init) = local1.init;
43
45
if let ExprKind::Path(ref path8) = init.node;
44
46
if match_qpath(path8, &["__next"]);
45
47
if let PatKind::Binding(BindingAnnotation::Unannotated, _, name1, None) = local1.pat.node;
46
48
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
48
50
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;
50
54
if let Some(ref init1) = local2.init;
51
55
if let ExprKind::Path(ref path9) = init1.node;
52
56
if match_qpath(path9, &["y"]);
0 commit comments