diff options
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/errors.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/lints.rs | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_pattern_analysis/src/errors.rs b/compiler/rustc_pattern_analysis/src/errors.rs index e471b8abd73..21a61d46ccb 100644 --- a/compiler/rustc_pattern_analysis/src/errors.rs +++ b/compiler/rustc_pattern_analysis/src/errors.rs @@ -1,4 +1,4 @@ -use rustc_errors::{AddToDiagnostic, Diag, EmissionGuarantee, SubdiagMessageOp}; +use rustc_errors::{Diag, EmissionGuarantee, SubdiagMessageOp, Subdiagnostic}; use rustc_macros::{LintDiagnostic, Subdiagnostic}; use rustc_middle::thir::Pat; use rustc_middle::ty::Ty; @@ -61,8 +61,8 @@ pub struct Overlap<'tcx> { pub range: Pat<'tcx>, } -impl<'tcx> AddToDiagnostic for Overlap<'tcx> { - fn add_to_diagnostic_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>( +impl<'tcx> Subdiagnostic for Overlap<'tcx> { + fn add_to_diag_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>( self, diag: &mut Diag<'_, G>, _: F, @@ -109,8 +109,8 @@ pub struct GappedRange<'tcx> { pub first_range: Pat<'tcx>, } -impl<'tcx> AddToDiagnostic for GappedRange<'tcx> { - fn add_to_diagnostic_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>( +impl<'tcx> Subdiagnostic for GappedRange<'tcx> { + fn add_to_diag_with<G: EmissionGuarantee, F: SubdiagMessageOp<G>>( self, diag: &mut Diag<'_, G>, _: F, diff --git a/compiler/rustc_pattern_analysis/src/lints.rs b/compiler/rustc_pattern_analysis/src/lints.rs index 30e775733de..16530960656 100644 --- a/compiler/rustc_pattern_analysis/src/lints.rs +++ b/compiler/rustc_pattern_analysis/src/lints.rs @@ -97,7 +97,7 @@ pub(crate) fn lint_nonexhaustive_missing_variants<'p, 'tcx>( lint_name: "non_exhaustive_omitted_patterns", }; - use rustc_errors::DecorateLint; + use rustc_errors::LintDiagnostic; let mut err = rcx.tcx.dcx().struct_span_warn(arm.pat.data().unwrap().span, ""); err.primary_message(decorator.msg()); decorator.decorate_lint(&mut err); |
