2 if let ExprKind::Block(ref block) = expr.kind;
3 if block.stmts.len() == 2;
4 if let StmtKind::Local(ref local) = block.stmts[0].kind;
5 if let Some(ref init) = local.init;
6 if let ExprKind::Lit(ref lit) = init.kind;
7 if let LitKind::Int(42, _) = lit.node;
8 if let PatKind::Binding(BindingAnnotation::Unannotated, _, name, None) = local.pat.kind;
9 if name.as_str() == "x";
10 if let StmtKind::Semi(ref e, _) = block.stmts[1].kind
11 if let ExprKind::Unary(UnOp::Neg, ref inner) = e.kind;
12 if let ExprKind::Path(ref path) = inner.kind;
13 if match_qpath(path, &["x"]);
14 if block.expr.is_none();
16 // report your lint here
20 if let ExprKind::Block(ref block) = expr.kind;
21 if block.stmts.len() == 1;
22 if let StmtKind::Local(ref local) = block.stmts[0].kind;
23 if let Some(ref init) = local.init;
24 if let ExprKind::Call(ref func, ref args) = init.kind;
25 if let ExprKind::Path(ref path) = func.kind;
26 if match_qpath(path, &["String", "new"]);
28 if let PatKind::Binding(BindingAnnotation::Unannotated, _, name, None) = local.pat.kind;
29 if name.as_str() == "expr";
30 if let Some(trailing_expr) = &block.expr;
31 if let ExprKind::Call(ref func1, ref args1) = trailing_expr.kind;
32 if let ExprKind::Path(ref path1) = func1.kind;
33 if match_qpath(path1, &["drop"]);
35 if let ExprKind::Path(ref path2) = args1[0].kind;
36 if match_qpath(path2, &["expr"]);
38 // report your lint here