DeconstructedPat.data is always present now

This commit is contained in:
Nadrieril
2024-02-06 03:37:03 +01:00
parent 6ae9fa31f0
commit d339bdaa07
4 changed files with 15 additions and 17 deletions

View File

@@ -98,7 +98,7 @@ pub(crate) fn lint_nonexhaustive_missing_variants<'p, 'tcx>(
};
use rustc_errors::LintDiagnostic;
let mut err = rcx.tcx.dcx().struct_span_warn(arm.pat.data().unwrap().span, "");
let mut err = rcx.tcx.dcx().struct_span_warn(arm.pat.data().span, "");
err.primary_message(decorator.msg());
decorator.decorate_lint(&mut err);
err.emit();