rust-clippy/tests/ui/author/repeat.stdout

12 lines
409 B
Text
Raw Normal View History

2021-10-29 01:39:41 +00:00
if_chain! {
2021-11-10 21:59:49 +00:00
if let ExprKind::Repeat(value, length) = expr.kind;
2021-10-29 01:39:41 +00:00
if let ExprKind::Lit(ref lit) = value.kind;
if let LitKind::Int(1, LitIntType::Unsigned(UintTy::U8)) = lit.node;
2021-11-05 22:05:04 +00:00
let expr1 = &cx.tcx.hir().body(length.body).value;
if let ExprKind::Lit(ref lit1) = expr1.kind;
2021-10-29 01:39:41 +00:00
if let LitKind::Int(5, LitIntType::Unsuffixed) = lit1.node;
then {
// report your lint here
}
}