2022-10-23 08:18:45 -05:00
|
|
|
if let ExprKind::Repeat(value, length) = expr.kind
|
|
|
|
&& let ExprKind::Lit(ref lit) = value.kind
|
|
|
|
&& let LitKind::Int(1, LitIntType::Unsigned(UintTy::U8)) = lit.node
|
2024-07-16 21:07:36 -05:00
|
|
|
&& let ArrayLen::Body(const_arg) = length
|
|
|
|
&& let ConstArgKind::Anon(anon_const) = const_arg.kind
|
2022-10-23 08:18:45 -05:00
|
|
|
&& expr1 = &cx.tcx.hir().body(anon_const.body).value
|
|
|
|
&& let ExprKind::Lit(ref lit1) = expr1.kind
|
|
|
|
&& let LitKind::Int(5, LitIntType::Unsuffixed) = lit1.node
|
|
|
|
{
|
|
|
|
// report your lint here
|
2021-12-06 05:33:31 -06:00
|
|
|
}
|