mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-20 09:20:36 +00:00
The end goal is to eliminate `Map` altogether. I added a `hir_` prefix to all of them, that seemed simplest. The exceptions are `module_items` which became `hir_module_free_items` because there was already a `hir_module_items`, and `items` which became `hir_free_items` for consistency with `hir_module_free_items`.
11 lines
425 B
Plaintext
11 lines
425 B
Plaintext
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
|
|
}
|