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