From 18251c480b37c96db2d93ce79c138754d4e28904 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 19 Dec 2023 08:11:25 +1100 Subject: [PATCH] Remove unnecessary `use` items in derived `IntoDiagnostic` impls. Presumably these are a hangover from an earlier time when they were necessary. --- compiler/rustc_macros/src/diagnostics/diagnostic.rs | 2 -- compiler/rustc_macros/src/diagnostics/subdiagnostic.rs | 1 - 2 files changed, 3 deletions(-) diff --git a/compiler/rustc_macros/src/diagnostics/diagnostic.rs b/compiler/rustc_macros/src/diagnostics/diagnostic.rs index 5de0203fc1d..76ef2c264a8 100644 --- a/compiler/rustc_macros/src/diagnostics/diagnostic.rs +++ b/compiler/rustc_macros/src/diagnostics/diagnostic.rs @@ -92,7 +92,6 @@ impl<'a> DiagnosticDerive<'a> { self, #dcx: &'_sess rustc_errors::DiagCtxt ) -> rustc_errors::DiagnosticBuilder<'_sess, G> { - use rustc_errors::IntoDiagnosticArg; #implementation } } @@ -177,7 +176,6 @@ impl<'a> LintDiagnosticDerive<'a> { self, #diag: &'__b mut rustc_errors::DiagnosticBuilder<'__a, ()> ) { - use rustc_errors::IntoDiagnosticArg; #implementation; } diff --git a/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs b/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs index 0f9e68cdc50..663abecb67c 100644 --- a/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs +++ b/compiler/rustc_macros/src/diagnostics/subdiagnostic.rs @@ -94,7 +94,6 @@ impl SubdiagnosticDeriveBuilder { rustc_errors::SubdiagnosticMessage ) -> rustc_errors::SubdiagnosticMessage, { - use rustc_errors::{Applicability, IntoDiagnosticArg}; #implementation } }