2024-05-26 10:50:30 +07:00
|
|
|
if let StmtKind::Let(local) = stmt.kind
|
2022-10-23 15:18:45 +02:00
|
|
|
&& 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
|
2024-04-16 19:23:30 -04:00
|
|
|
&& let PatKind::Binding(BindingMode::NONE, _, name, None) = local.pat.kind
|
2022-10-23 15:18:45 +02:00
|
|
|
&& name.as_str() == "x"
|
|
|
|
{
|
|
|
|
// report your lint here
|
2018-02-24 02:02:48 +01:00
|
|
|
}
|