rust/tests/ui-internal/author/issue_3849.stdout
blyxyas 698363122e Do not run lints that cannot emit
Before this change, adding a lint was a difficult matter
because it always had some overhead involved. This was
because all lints would run, no matter their default level,
or if the user had #![allow]ed them. This PR changes that
2024-10-19 16:19:44 +02:00

13 lines
419 B
Plaintext

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, &["std", "mem", "transmute"])
&& args.len() == 1
&& let ExprKind::Path(ref qpath1) = args[0].kind
&& match_qpath(qpath1, &["ZPTR"])
&& let PatKind::Wild = local.pat.kind
{
// report your lint here
}