rust/tests/ui/author/call.stdout
Philipp Krones 03daf7ccb2
Fix author lint and move it back to tests/ui
The author lint is not an internal lint, and should also be enabled, when Clippy
is distributed through rustup. This moves the author lint test cases back to
tests/ui.
2024-11-07 17:22:32 +01:00

14 lines
558 B
Text

if let StmtKind::Let(local) = stmt.kind
&& let Some(init) = local.init
&& let ExprKind::Call(func, args) = init.kind
&& let ExprKind::Path(ref qpath) = func.kind
&& match_qpath(qpath, &["{{root}}", "std", "cmp", "min"])
&& args.len() == 2
&& let ExprKind::Lit(ref lit) = args[0].kind
&& let LitKind::Int(3, LitIntType::Unsuffixed) = lit.node
&& let ExprKind::Lit(ref lit1) = args[1].kind
&& let LitKind::Int(4, LitIntType::Unsuffixed) = lit1.node
&& let PatKind::Wild = local.pat.kind
{
// report your lint here
}