2 if let ExprKind::DropTemps(ref expr) = expr.kind;
3 if let ExprKind::Match(ref expr1, ref arms, MatchSource::ForLoopDesugar) = expr.kind;
4 if let ExprKind::Call(ref func, ref args) = expr1.kind;
5 if let ExprKind::Path(ref path) = func.kind;
6 if match_qpath(path, &["{{root}}", "std", "iter", "IntoIterator", "into_iter"]);
8 if let ExprKind::Struct(ref path1, ref fields, None) = args[0].kind;
9 if match_qpath(path1, &["{{root}}", "std", "ops", "Range"]);
11 // unimplemented: field checks
13 if let ExprKind::Loop(ref body, ref label, LoopSource::ForLoop) = arms[0].body.kind;
14 if let Some(trailing_expr) = &body.expr;
15 if body.stmts.len() == 4;
16 if let StmtKind::Local(ref local) = body.stmts[0].kind;
17 if let PatKind::Binding(BindingAnnotation::Mutable, _, name, None) = local.pat.kind;
18 if name.as_str() == "__next";
19 if let StmtKind::Expr(ref e, _) = body.stmts[1].kind
20 if let ExprKind::Match(ref expr2, ref arms1, MatchSource::ForLoopDesugar) = e.kind;
21 if let ExprKind::Call(ref func1, ref args1) = expr2.kind;
22 if let ExprKind::Path(ref path2) = func1.kind;
23 if match_qpath(path2, &["{{root}}", "std", "iter", "Iterator", "next"]);
25 if let ExprKind::AddrOf(MutMutable, ref inner) = args1[0].kind;
26 if let ExprKind::Path(ref path3) = inner.kind;
27 if match_qpath(path3, &["iter"]);
29 if let ExprKind::Assign(ref target, ref value) = arms1[0].body.kind;
30 if let ExprKind::Path(ref path4) = target.kind;
31 if match_qpath(path4, &["__next"]);
32 if let ExprKind::Path(ref path5) = value.kind;
33 if match_qpath(path5, &["val"]);
34 if let PatKind::TupleStruct(ref path6, ref fields1, None) = arms1[0].pat.kind;
35 if match_qpath(path6, &["{{root}}", "std", "option", "Option", "Some"]);
36 if fields1.len() == 1;
37 // unimplemented: field checks
38 if let ExprKind::Break(ref destination, None) = arms1[1].body.kind;
39 if let PatKind::Path(ref path7) = arms1[1].pat.kind;
40 if match_qpath(path7, &["{{root}}", "std", "option", "Option", "None"]);
41 if let StmtKind::Local(ref local1) = body.stmts[2].kind;
42 if let Some(ref init) = local1.init;
43 if let ExprKind::Path(ref path8) = init.kind;
44 if match_qpath(path8, &["__next"]);
45 if let PatKind::Binding(BindingAnnotation::Unannotated, _, name1, None) = local1.pat.kind;
46 if name1.as_str() == "y";
47 if let StmtKind::Expr(ref e1, _) = body.stmts[3].kind
48 if let ExprKind::Block(ref block) = e1.kind;
49 if let Some(trailing_expr1) = &block.expr;
50 if block.stmts.len() == 1;
51 if let StmtKind::Local(ref local2) = block.stmts[0].kind;
52 if let Some(ref init1) = local2.init;
53 if let ExprKind::Path(ref path9) = init1.kind;
54 if match_qpath(path9, &["y"]);
55 if let PatKind::Binding(BindingAnnotation::Unannotated, _, name2, None) = local2.pat.kind;
56 if name2.as_str() == "z";
57 if let PatKind::Binding(BindingAnnotation::Mutable, _, name3, None) = arms[0].pat.kind;
58 if name3.as_str() == "iter";
60 // report your lint here