2018-05-27 14:04:28 +00:00
|
|
|
if_chain! {
|
2021-11-10 21:59:49 +00:00
|
|
|
if let StmtKind::Local(local) = stmt.kind;
|
|
|
|
if let Some(init) = local.init;
|
|
|
|
if let ExprKind::Call(func, args) = init.kind;
|
2021-11-08 23:05:37 +00:00
|
|
|
if let ExprKind::Path(ref qpath) = func.kind;
|
|
|
|
if match_qpath(qpath, &["{{root}}", "std", "cmp", "min"]);
|
2018-05-27 14:04:28 +00:00
|
|
|
if args.len() == 2;
|
2019-09-27 15:16:06 +00:00
|
|
|
if let ExprKind::Lit(ref lit) = args[0].kind;
|
2021-10-29 01:39:41 +00:00
|
|
|
if let LitKind::Int(3, LitIntType::Unsuffixed) = lit.node;
|
2019-09-27 15:16:06 +00:00
|
|
|
if let ExprKind::Lit(ref lit1) = args[1].kind;
|
2021-10-29 01:39:41 +00:00
|
|
|
if let LitKind::Int(4, LitIntType::Unsuffixed) = lit1.node;
|
2019-09-27 15:16:06 +00:00
|
|
|
if let PatKind::Wild = local.pat.kind;
|
2018-05-27 14:04:28 +00:00
|
|
|
then {
|
|
|
|
// report your lint here
|
|
|
|
}
|
|
|
|
}
|