diff options
| author | bors <bors@rust-lang.org> | 2024-03-12 05:55:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-12 05:55:19 +0000 |
| commit | 9b6a6b8f62ffd66545ea9e1858ce9e463cc72801 (patch) | |
| tree | 867759edc0e773810a18d5349733a6d4a11d3ee8 /compiler/rustc_pattern_analysis/src | |
| parent | 7a5b6eb9dc543cf28e1e27fa138bbf884dc56533 (diff) | |
| parent | 19378ca0969c5a105a03a2d156c10be7b58f6a66 (diff) | |
| download | rust-9b6a6b8f62ffd66545ea9e1858ce9e463cc72801.tar.gz rust-9b6a6b8f62ffd66545ea9e1858ce9e463cc72801.zip | |
Auto merge of #3375 - rust-lang:rustup-2024-03-12, r=oli-obk
Automatic Rustup
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); |
