2 if let ExprKind::Struct(qpath, fields, None) = expr.kind;
3 if match_qpath(qpath, &["Test"]);
5 if fields[0].ident.as_str() == "field";
6 if let ExprKind::If(cond, then, Some(else_expr)) = fields[0].expr.kind;
7 if let ExprKind::DropTemps(expr1) = cond.kind;
8 if let ExprKind::Lit(ref lit) = expr1.kind;
9 if let LitKind::Bool(true) = lit.node;
10 if let ExprKind::Block(block, None) = then.kind;
11 if block.stmts.is_empty();
12 if let Some(trailing_expr) = block.expr;
13 if let ExprKind::Lit(ref lit1) = trailing_expr.kind;
14 if let LitKind::Int(1, LitIntType::Unsuffixed) = lit1.node;
15 if let ExprKind::Block(block1, None) = else_expr.kind;
16 if block1.stmts.is_empty();
17 if let Some(trailing_expr1) = block1.expr;
18 if let ExprKind::Lit(ref lit2) = trailing_expr1.kind;
19 if let LitKind::Int(0, LitIntType::Unsuffixed) = lit2.node;
21 // report your lint here
25 if let PatKind::Struct(ref qpath, fields, false) = arm.pat.kind;
26 if match_qpath(qpath, &["Test"]);
28 if fields[0].ident.as_str() == "field";
29 if let PatKind::Lit(lit_expr) = fields[0].pat.kind;
30 if let ExprKind::Lit(ref lit) = lit_expr.kind;
31 if let LitKind::Int(1, LitIntType::Unsuffixed) = lit.node;
32 if arm.guard.is_none();
33 if let ExprKind::Block(block, None) = arm.body.kind;
34 if block.stmts.is_empty();
35 if block.expr.is_none();
37 // report your lint here
41 if let PatKind::TupleStruct(ref qpath, fields, None) = arm.pat.kind;
42 if match_qpath(qpath, &["TestTuple"]);
44 if let PatKind::Lit(lit_expr) = fields[0].kind;
45 if let ExprKind::Lit(ref lit) = lit_expr.kind;
46 if let LitKind::Int(1, LitIntType::Unsuffixed) = lit.node;
47 if arm.guard.is_none();
48 if let ExprKind::Block(block, None) = arm.body.kind;
49 if block.stmts.is_empty();
50 if block.expr.is_none();
52 // report your lint here
56 if let ExprKind::MethodCall(method_name, args, _) = expr.kind;
57 if method_name.ident.as_str() == "test";
59 if let ExprKind::Path(ref qpath) = args[0].kind;
60 if match_qpath(qpath, &["test_method_call"]);
62 // report your lint here