- if let Some((Constant::Bool(is_true), _)) = constant(cx, cx.tables(), expr);
- // arm 1 pattern
- if let PatKind::Lit(ref lit_expr) = arms[0].pat.kind;
- if let ExprKind::Lit(ref lit) = lit_expr.kind;
- if let LitKind::Bool(true) = lit.node;
- // arm 1 block
- if let ExprKind::Block(ref block, _) = arms[0].body.kind;
+ if let Some((Constant::Bool(is_true), _)) = constant(cx, cx.typeck_results(), expr);
+ // block
+ if let ExprKind::Block(ref block, _) = then.kind;