diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2023-12-11 20:01:02 +0100 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2023-12-15 16:58:36 +0100 |
| commit | 3d7c4df3260f80593c70f901029d696520234b64 (patch) | |
| tree | ea71f298aa0b06353768d00c1bbbae15e54504ee /compiler/rustc_pattern_analysis/src/errors.rs | |
| parent | 3ad76f93256c0869aafeb1404f494f00e6d5b5ae (diff) | |
| download | rust-3d7c4df3260f80593c70f901029d696520234b64.tar.gz rust-3d7c4df3260f80593c70f901029d696520234b64.zip | |
Abstract `MatchCheckCtxt` into a trait
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/errors.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_pattern_analysis/src/errors.rs b/compiler/rustc_pattern_analysis/src/errors.rs index 0efa8a0ec08..3483a2710d4 100644 --- a/compiler/rustc_pattern_analysis/src/errors.rs +++ b/compiler/rustc_pattern_analysis/src/errors.rs @@ -1,11 +1,11 @@ -use crate::{cx::MatchCheckCtxt, pat::WitnessPat}; - use rustc_errors::{AddToDiagnostic, Diagnostic, SubdiagnosticMessage}; use rustc_macros::{LintDiagnostic, Subdiagnostic}; use rustc_middle::thir::Pat; use rustc_middle::ty::Ty; use rustc_span::Span; +use crate::cx::{MatchCheckCtxt, WitnessPat}; + #[derive(Subdiagnostic)] #[label(pattern_analysis_uncovered)] pub struct Uncovered<'tcx> { @@ -22,7 +22,7 @@ impl<'tcx> Uncovered<'tcx> { pub fn new<'p>( span: Span, cx: &MatchCheckCtxt<'p, 'tcx>, - witnesses: Vec<WitnessPat<'tcx>>, + witnesses: Vec<WitnessPat<'p, 'tcx>>, ) -> Self { let witness_1 = cx.hoist_witness_pat(witnesses.get(0).unwrap()); Self { |
