diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-06 14:00:16 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-11 10:04:49 +1100 |
| commit | 541d7cc65c56402f31335e41075838c0da5fbe01 (patch) | |
| tree | 4dcf1c44019f4bb235268ec7f45b38cc15617c43 /compiler/rustc_pattern_analysis/src/errors.rs | |
| parent | 7a294e998b66ea6d410a6840cba80347fc4764c2 (diff) | |
| download | rust-541d7cc65c56402f31335e41075838c0da5fbe01.tar.gz rust-541d7cc65c56402f31335e41075838c0da5fbe01.zip | |
Rename `AddToDiagnostic` as `Subdiagnostic`.
To match `derive(Subdiagnostic)`.
Also rename `add_to_diagnostic{,_with}` as `add_to_diag{,_with}`.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/errors.rs | 10 |
1 files changed, 5 insertions, 5 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, |
