From 541d7cc65c56402f31335e41075838c0da5fbe01 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 6 Mar 2024 14:00:16 +1100 Subject: Rename `AddToDiagnostic` as `Subdiagnostic`. To match `derive(Subdiagnostic)`. Also rename `add_to_diagnostic{,_with}` as `add_to_diag{,_with}`. --- compiler/rustc_pattern_analysis/src/errors.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler/rustc_pattern_analysis/src/errors.rs') 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>( +impl<'tcx> Subdiagnostic for Overlap<'tcx> { + fn add_to_diag_with>( 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>( +impl<'tcx> Subdiagnostic for GappedRange<'tcx> { + fn add_to_diag_with>( self, diag: &mut Diag<'_, G>, _: F, -- cgit 1.4.1-3-g733a5