// Since this optimization adds new basic blocks and invalidates others,
// clean up the cfg to make it nicer for other passes
if should_cleanup {
- simplify_cfg(body);
+ simplify_cfg(tcx, body);
}
}
}
fn is_switch<'tcx>(terminator: &Terminator<'tcx>) -> bool {
- match terminator.kind {
- TerminatorKind::SwitchInt { .. } => true,
- _ => false,
- }
+ matches!(terminator.kind, TerminatorKind::SwitchInt { .. })
}
struct Helper<'a, 'tcx> {