From 40290505fb0aab2ad673a0caa840fc87a1790338 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Tue, 1 Nov 2022 08:45:58 -0400 Subject: cfg-step code --- compiler/rustc_errors/src/diagnostic.rs | 3 +-- compiler/rustc_errors/src/diagnostic_builder.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_errors/src') diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 45c017df918..073ccfe061d 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -55,8 +55,7 @@ impl<'source> Into> for DiagnosticArgValue<'source> { /// Trait implemented by error types. This should not be implemented manually. Instead, use /// `#[derive(Subdiagnostic)]` -- see [rustc_macros::Subdiagnostic]. -#[cfg_attr(bootstrap, rustc_diagnostic_item = "AddSubdiagnostic")] -#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "AddToDiagnostic")] +#[rustc_diagnostic_item = "AddToDiagnostic"] pub trait AddToDiagnostic where Self: Sized, diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs index ecf8570e81f..1e1dcb04d70 100644 --- a/compiler/rustc_errors/src/diagnostic_builder.rs +++ b/compiler/rustc_errors/src/diagnostic_builder.rs @@ -16,8 +16,7 @@ use std::thread::panicking; /// Trait implemented by error types. This should not be implemented manually. Instead, use /// `#[derive(Diagnostic)]` -- see [rustc_macros::Diagnostic]. -#[cfg_attr(bootstrap, rustc_diagnostic_item = "SessionDiagnostic")] -#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "IntoDiagnostic")] +#[rustc_diagnostic_item = "IntoDiagnostic"] pub trait IntoDiagnostic<'a, T: EmissionGuarantee = ErrorGuaranteed> { /// Write out as a diagnostic out of `Handler`. #[must_use] -- cgit 1.4.1-3-g733a5