2021-12-06 05:33:31 -06:00
|
|
|
if_chain! {
|
|
|
|
if let ExprKind::Repeat(value, length) = expr.kind;
|
|
|
|
if let ExprKind::Lit(ref lit) = value.kind;
|
|
|
|
if let LitKind::Int(1, LitIntType::Unsigned(UintTy::U8)) = lit.node;
|
2021-12-23 03:02:05 -06:00
|
|
|
if let ArrayLen::Body(anon_const) = length;
|
|
|
|
let expr1 = &cx.tcx.hir().body(anon_const.body).value;
|
2021-12-06 05:33:31 -06:00
|
|
|
if let ExprKind::Lit(ref lit1) = expr1.kind;
|
|
|
|
if let LitKind::Int(5, LitIntType::Unsuffixed) = lit1.node;
|
|
|
|
then {
|
|
|
|
// report your lint here
|
|
|
|
}
|
|
|
|
}
|