]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/author/if.stdout
Rollup merge of #92024 - pcwalton:per-codegen-unit-names, r=davidtwco
[rust.git] / src / tools / clippy / tests / ui / author / if.stdout
1 if_chain! {
2     if let StmtKind::Local(local) = stmt.kind;
3     if let Some(init) = local.init;
4     if let ExprKind::If(cond, then, Some(else_expr)) = init.kind;
5     if let ExprKind::DropTemps(expr) = cond.kind;
6     if let ExprKind::Lit(ref lit) = expr.kind;
7     if let LitKind::Bool(true) = lit.node;
8     if let ExprKind::Block(block, None) = then.kind;
9     if block.stmts.len() == 1;
10     if let StmtKind::Semi(e) = block.stmts[0].kind;
11     if let ExprKind::Binary(op, left, right) = e.kind;
12     if BinOpKind::Eq == op.node;
13     if let ExprKind::Lit(ref lit1) = left.kind;
14     if let LitKind::Int(1, LitIntType::Unsuffixed) = lit1.node;
15     if let ExprKind::Lit(ref lit2) = right.kind;
16     if let LitKind::Int(1, LitIntType::Unsuffixed) = lit2.node;
17     if block.expr.is_none();
18     if let ExprKind::Block(block1, None) = else_expr.kind;
19     if block1.stmts.len() == 1;
20     if let StmtKind::Semi(e1) = block1.stmts[0].kind;
21     if let ExprKind::Binary(op1, left1, right1) = e1.kind;
22     if BinOpKind::Eq == op1.node;
23     if let ExprKind::Lit(ref lit3) = left1.kind;
24     if let LitKind::Int(2, LitIntType::Unsuffixed) = lit3.node;
25     if let ExprKind::Lit(ref lit4) = right1.kind;
26     if let LitKind::Int(2, LitIntType::Unsuffixed) = lit4.node;
27     if block1.expr.is_none();
28     if let PatKind::Wild = local.pat.kind;
29     then {
30         // report your lint here
31     }
32 }
33 if_chain! {
34     if let ExprKind::If(cond, then, Some(else_expr)) = expr.kind;
35     if let ExprKind::Let(let_expr) = cond.kind;
36     if let PatKind::Lit(lit_expr) = let_expr.pat.kind;
37     if let ExprKind::Lit(ref lit) = lit_expr.kind;
38     if let LitKind::Bool(true) = lit.node;
39     if let ExprKind::Path(ref qpath) = let_expr.init.kind;
40     if match_qpath(qpath, &["a"]);
41     if let ExprKind::Block(block, None) = then.kind;
42     if block.stmts.is_empty();
43     if block.expr.is_none();
44     if let ExprKind::Block(block1, None) = else_expr.kind;
45     if block1.stmts.is_empty();
46     if block1.expr.is_none();
47     then {
48         // report your lint here
49     }
50 }