mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
12 lines
472 B
Text
12 lines
472 B
Text
if let StmtKind::Local(local) = stmt.kind
|
|
&& let Some(init) = local.init
|
|
&& let ExprKind::Cast(expr, cast_ty) = init.kind
|
|
&& let TyKind::Path(ref qpath) = cast_ty.kind
|
|
&& match_qpath(qpath, &["char"])
|
|
&& let ExprKind::Lit(ref lit) = expr.kind
|
|
&& let LitKind::Int(69, LitIntType::Unsuffixed) = lit.node
|
|
&& let PatKind::Binding(BindingAnnotation::NONE, _, name, None) = local.pat.kind
|
|
&& name.as_str() == "x"
|
|
{
|
|
// report your lint here
|
|
}
|