blob: 1a608734ada913f9d3070f875e39acffac4cecb5 (
plain)
1
2
3
4
5
6
7
8
9
10
|
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 ConstArgKind::Anon(anon_const) = length.kind
&& 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
}
|