From bd538f90fe127a8896935c03d6be8a336edc0780 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 3 Mar 2026 17:21:41 +0100 Subject: [PATCH] Remove unused `rustc_errors::LintDiagnosticBox` trait --- compiler/rustc_errors/src/diagnostic.rs | 10 ---------- compiler/rustc_errors/src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 27a70534c5bc..4dec167b982b 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -137,16 +137,6 @@ pub trait LintDiagnostic<'a, G: EmissionGuarantee> { fn decorate_lint<'b>(self, diag: &'b mut Diag<'a, G>); } -pub trait LintDiagnosticBox<'a, G: EmissionGuarantee> { - fn decorate_lint_box<'b>(self: Box, diag: &'b mut Diag<'a, G>); -} - -impl<'a, G: EmissionGuarantee, D: LintDiagnostic<'a, G>> LintDiagnosticBox<'a, G> for D { - fn decorate_lint_box<'b>(self: Box, diag: &'b mut Diag<'a, G>) { - self.decorate_lint(diag); - } -} - #[derive(Clone, Debug, Encodable, Decodable)] pub(crate) struct DiagLocation { file: Cow<'static, str>, diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index eab919f08ab5..4ef4d5807463 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -40,7 +40,7 @@ pub use decorate_diag::{BufferedEarlyLint, DecorateDiagCompat, LintBuffer}; pub use diagnostic::{ BugAbort, Diag, DiagInner, DiagStyledString, Diagnostic, EmissionGuarantee, FatalAbort, - LintDiagnostic, LintDiagnosticBox, StringPart, Subdiag, Subdiagnostic, + LintDiagnostic, StringPart, Subdiag, Subdiagnostic, }; pub use diagnostic_impls::{ DiagSymbolList, ElidedLifetimeInPathSubdiag, ExpectedLifetimeParameter,