Function rustc_mir_build::thir::pattern::usefulness::lint_non_exhaustive_omitted_patterns
source · [−]fn lint_non_exhaustive_omitted_patterns<'p, 'tcx>(
cx: &MatchCheckCtxt<'p, 'tcx>,
scrut_ty: Ty<'tcx>,
sp: Span,
hir_id: HirId,
witnesses: Vec<DeconstructedPat<'p, 'tcx>>
)
Expand description
Report that a match of a non_exhaustive
enum marked with non_exhaustive_omitted_patterns
is not exhaustive enough.
NB: The partner lint for structs lives in compiler/rustc_typeck/src/check/pat.rs
.