diff options
| author | bors <bors@rust-lang.org> | 2024-03-11 00:34:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-11 00:34:44 +0000 |
| commit | cd81f5b27ee00b49d413db50b5e6af871cebcf23 (patch) | |
| tree | de825c76d6714c2be261ff363eb2c840c2484578 /compiler/rustc_pattern_analysis/src | |
| parent | 76ee6fc926032c16a5706086922fc1125c061b70 (diff) | |
| parent | 43c06335cf2d1cc6b12fcfa5b8795d9becc52e8c (diff) | |
| download | rust-cd81f5b27ee00b49d413db50b5e6af871cebcf23.tar.gz rust-cd81f5b27ee00b49d413db50b5e6af871cebcf23.zip | |
Auto merge of #122132 - nnethercote:diag-renaming3, r=nnethercote
Diagnostic renaming 3 A sequel to https://github.com/rust-lang/rust/pull/121780. r? `@davidtwco`
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); |
