2 if let ExprKind::Block(block, label) = expr.kind;
3 if block.stmts.len() == 3;
4 if let StmtKind::Local(local) = block.stmts[0].kind;
5 if let Some(init) = local.init;
6 if let ExprKind::Lit(ref lit) = init.kind;
7 if let LitKind::Int(42, LitIntType::Signed(IntTy::I32)) = lit.node;
8 if let PatKind::Binding(BindingAnnotation::Unannotated, _, name, None) = local.pat.kind;
9 if name.as_str() == "x";
10 if let StmtKind::Local(local1) = block.stmts[1].kind;
11 if let Some(init1) = local1.init;
12 if let ExprKind::Lit(ref lit1) = init1.kind;
13 if let LitKind::Float(_, LitFloatType::Suffixed(FloatTy::F32)) = lit1.node;
14 if let PatKind::Binding(BindingAnnotation::Unannotated, _, name1, None) = local1.pat.kind;
15 if name1.as_str() == "_t";
16 if let StmtKind::Semi(e) = block.stmts[2].kind;
17 if let ExprKind::Unary(UnOp::Neg, inner) = e.kind;
18 if let ExprKind::Path(ref qpath) = inner.kind;
19 if match_qpath(qpath, &["x"]);
20 if block.expr.is_none();
22 // report your lint here
26 if let ExprKind::Block(block, label) = expr.kind;
27 if block.stmts.len() == 1;
28 if let StmtKind::Local(local) = block.stmts[0].kind;
29 if let Some(init) = local.init;
30 if let ExprKind::Call(func, args) = init.kind;
31 if let ExprKind::Path(ref qpath) = func.kind;
32 if match_qpath(qpath, &["String", "new"]);
34 if let PatKind::Binding(BindingAnnotation::Unannotated, _, name, None) = local.pat.kind;
35 if name.as_str() == "expr";
36 if let Some(trailing_expr) = block.expr;
37 if let ExprKind::Call(func1, args1) = trailing_expr.kind;
38 if let ExprKind::Path(ref qpath1) = func1.kind;
39 if match_qpath(qpath1, &["drop"]);
41 if let ExprKind::Path(ref qpath2) = args1[0].kind;
42 if match_qpath(qpath2, &["expr"]);
44 // report your lint here
48 if let ExprKind::Closure(CaptureBy::Value, fn_decl, body_id, _, None) = expr.kind;
49 if let FnRetTy::DefaultReturn(_) = fn_decl.output;
50 let body = cx.tcx.hir().body(body_id);
51 if let ExprKind::Call(func, args) = body.value.kind;
52 if let ExprKind::Path(ref qpath) = func.kind;
53 if matches!(qpath, QPath::LangItem(LangItem::FromGenerator, _));
55 if let ExprKind::Closure(CaptureBy::Value, fn_decl1, body_id1, _, Some(Movability::Static)) = args[0].kind;
56 if let FnRetTy::DefaultReturn(_) = fn_decl1.output;
57 let body1 = cx.tcx.hir().body(body_id1);
58 if let ExprKind::Block(block, label) = body1.value.kind;
59 if block.stmts.len() == 0;
60 if block.expr.is_none();
62 // report your lint here