rust/tests/ui/author/call.stdout

17 lines
578 B
Text
Raw Normal View History

2018-05-27 16:04:28 +02:00
if_chain! {
2019-09-27 17:16:06 +02:00
if let StmtKind::Local(ref local) = stmt.kind;
2019-03-07 14:07:01 +01:00
if let Some(ref init) = local.init;
2019-09-27 17:16:06 +02:00
if let ExprKind::Call(ref func, ref args) = init.kind;
if let ExprKind::Path(ref path) = func.kind;
2018-05-27 16:04:28 +02:00
if match_qpath(path, &["{{root}}", "std", "cmp", "min"]);
if args.len() == 2;
2019-09-27 17:16:06 +02:00
if let ExprKind::Lit(ref lit) = args[0].kind;
2018-05-27 16:04:28 +02:00
if let LitKind::Int(3, _) = lit.node;
2019-09-27 17:16:06 +02:00
if let ExprKind::Lit(ref lit1) = args[1].kind;
2018-05-27 16:04:28 +02:00
if let LitKind::Int(4, _) = lit1.node;
2019-09-27 17:16:06 +02:00
if let PatKind::Wild = local.pat.kind;
2018-05-27 16:04:28 +02:00
then {
// report your lint here
}
}