]> git.lizzy.rs Git - rust.git/blob - tests/ui/author/for_loop.stdout
author tests: update for_loop.stdout file
[rust.git] / tests / ui / author / for_loop.stdout
1 if_chain! {
2     if let Expr_::ExprBlock(ref block) = expr.node;
3     if let Stmt_::StmtDecl(ref decl, _) = block.node
4     if let Decl_::DeclLocal(ref local) = decl.node;
5     if let Some(ref init) = local.init
6     if let Expr_::ExprMatch(ref expr, ref arms, MatchSource::ForLoopDesugar) = init.node;
7     if let Expr_::ExprCall(ref func, ref args) = expr.node;
8     if let Expr_::ExprPath(ref path) = func.node;
9     if match_qpath(path, &["{{root}}", "std", "iter", "IntoIterator", "into_iter"]);
10     if args.len() == 1;
11     if let Expr_::ExprStruct(ref path1, ref fields, None) = args[0].node;
12     if match_qpath(path1, &["{{root}}", "std", "ops", "Range"]);
13     if fields.len() == 2;
14     // unimplemented: field checks
15     if arms.len() == 1;
16     if let Expr_::ExprLoop(ref body, ref label, LoopSource::ForLoop) = arms[0].body.node;
17     if let Stmt_::StmtDecl(ref decl1, _) = body.node
18     if let Decl_::DeclLocal(ref local1) = decl1.node;
19     if let PatKind::Binding(BindingAnnotation::Mutable, _, name, None) = local1.pat.node;
20     if name.node.as_str() == "__next";
21     if let Stmt_::StmtExpr(ref e, _) = local1.pat.node
22     if let Expr_::ExprMatch(ref expr1, ref arms1, MatchSource::ForLoopDesugar) = e.node;
23     if let Expr_::ExprCall(ref func1, ref args1) = expr1.node;
24     if let Expr_::ExprPath(ref path2) = func1.node;
25     if match_qpath(path2, &["{{root}}", "std", "iter", "Iterator", "next"]);
26     if args1.len() == 1;
27     if let Expr_::ExprAddrOf(MutMutable, ref inner) = args1[0].node;
28     if let Expr_::ExprPath(ref path3) = inner.node;
29     if match_qpath(path3, &["iter"]);
30     if arms1.len() == 2;
31     if let Expr_::ExprAssign(ref target, ref value) = arms1[0].body.node;
32     if let Expr_::ExprPath(ref path4) = target.node;
33     if match_qpath(path4, &["__next"]);
34     if let Expr_::ExprPath(ref path5) = value.node;
35     if match_qpath(path5, &["val"]);
36     if arms1[0].pats.len() == 1;
37     if let PatKind::TupleStruct(ref path6, ref fields1, None) = arms1[0].pats[0].node;
38     if match_qpath(path6, &["{{root}}", "std", "option", "Option", "Some"]);
39     if fields1.len() == 1;
40     // unimplemented: field checks
41     if let Expr_::ExprBreak(ref destination, None) = arms1[1].body.node;
42     if arms1[1].pats.len() == 1;
43     if let PatKind::Path(ref path7) = arms1[1].pats[0].node;
44     if match_qpath(path7, &["{{root}}", "std", "option", "Option", "None"]);
45     if let Stmt_::StmtDecl(ref decl2, _) = path7.node
46     if let Decl_::DeclLocal(ref local2) = decl2.node;
47     if let Some(ref init1) = local2.init
48     if let Expr_::ExprPath(ref path8) = init1.node;
49     if match_qpath(path8, &["__next"]);
50     if let PatKind::Binding(BindingAnnotation::Unannotated, _, name1, None) = local2.pat.node;
51     if name1.node.as_str() == "y";
52     if let Stmt_::StmtExpr(ref e1, _) = local2.pat.node
53     if let Expr_::ExprBlock(ref block1) = e1.node;
54     if let Stmt_::StmtDecl(ref decl3, _) = block1.node
55     if let Decl_::DeclLocal(ref local3) = decl3.node;
56     if let Some(ref init2) = local3.init
57     if let Expr_::ExprPath(ref path9) = init2.node;
58     if match_qpath(path9, &["y"]);
59     if let PatKind::Binding(BindingAnnotation::Unannotated, _, name2, None) = local3.pat.node;
60     if name2.node.as_str() == "z";
61     if arms[0].pats.len() == 1;
62     if let PatKind::Binding(BindingAnnotation::Mutable, _, name3, None) = arms[0].pats[0].node;
63     if name3.node.as_str() == "iter";
64     if let PatKind::Binding(BindingAnnotation::Unannotated, _, name4, None) = local.pat.node;
65     if name4.node.as_str() == "_result";
66     if let Expr_::ExprPath(ref path10) = local.pat.node;
67     if match_qpath(path10, &["_result"]);
68     then {
69         // report your lint here
70     }
71 }