mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
10 lines
418 B
Text
10 lines
418 B
Text
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
|
|
&& let ArrayLen::Body(anon_const) = length
|
|
&& 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
|
|
}
|