[−][src]Function rustc_mir_build::thir::pattern::_match::compute_match_usefulness
pub(crate) fn compute_match_usefulness<'p, 'tcx>(
cx: &MatchCheckCtxt<'p, 'tcx>,
arms: &[MatchArm<'p, 'tcx>],
scrut_hir_id: HirId,
scrut_ty: Ty<'tcx>
) -> UsefulnessReport<'p, 'tcx>
The entrypoint for the usefulness algorithm. Computes whether a match is exhaustive and which of its arms are reachable.
Note: the input patterns must have been lowered through MatchVisitor::lower_pattern.