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