Reintroduce hir::ExprKind::If

This commit is contained in:
Caio
2021-01-01 15:38:11 -03:00
parent 053afe4907
commit 7d42172899
31 changed files with 152 additions and 131 deletions

View File

@@ -147,6 +147,9 @@ impl<'tcx> Visitor<'tcx> for CCHelper {
fn visit_expr(&mut self, e: &'tcx Expr<'_>) {
walk_expr(self, e);
match e.kind {
ExprKind::If(_, _, _) => {
self.cc += 1;
},
ExprKind::Match(_, ref arms, _) => {
if arms.len() > 1 {
self.cc += 1;