2018-05-27 09:04:28 -05:00
|
|
|
if_chain! {
|
2018-07-12 03:53:53 -05:00
|
|
|
if let StmtKind::Decl(ref decl, _) = stmt.node
|
2018-07-12 03:55:41 -05:00
|
|
|
if let DeclKind::Local(ref local) = decl.node;
|
2018-05-27 09:04:28 -05:00
|
|
|
if let Some(ref init) = local.init
|
2018-07-12 02:30:57 -05:00
|
|
|
if let ExprKind::Call(ref func, ref args) = init.node;
|
|
|
|
if let ExprKind::Path(ref path) = func.node;
|
2018-05-27 09:04:28 -05:00
|
|
|
if match_qpath(path, &["{{root}}", "std", "cmp", "min"]);
|
|
|
|
if args.len() == 2;
|
2018-07-12 02:30:57 -05:00
|
|
|
if let ExprKind::Lit(ref lit) = args[0].node;
|
2018-05-27 09:04:28 -05:00
|
|
|
if let LitKind::Int(3, _) = lit.node;
|
2018-07-12 02:30:57 -05:00
|
|
|
if let ExprKind::Lit(ref lit1) = args[1].node;
|
2018-05-27 09:04:28 -05:00
|
|
|
if let LitKind::Int(4, _) = lit1.node;
|
|
|
|
if let PatKind::Wild = local.pat.node;
|
|
|
|
then {
|
|
|
|
// report your lint here
|
|
|
|
}
|
|
|
|
}
|