From 19b348fed44342d8addbbb5e8f67cda5dc8d9b95 Mon Sep 17 00:00:00 2001 From: Jhonny Bill Mena Date: Sun, 18 Sep 2022 11:45:41 -0400 Subject: UPDATE - rename DiagnosticHandler trait to IntoDiagnostic --- compiler/rustc_interface/src/errors.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'compiler/rustc_interface/src/errors.rs') diff --git a/compiler/rustc_interface/src/errors.rs b/compiler/rustc_interface/src/errors.rs index 6a497aed4ab..dc975099fc7 100644 --- a/compiler/rustc_interface/src/errors.rs +++ b/compiler/rustc_interface/src/errors.rs @@ -1,10 +1,10 @@ -use rustc_macros::SessionDiagnostic; +use rustc_macros::DiagnosticHandler; use rustc_span::{Span, Symbol}; use std::io; use std::path::Path; -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::ferris_identifier)] pub struct FerrisIdentifier { #[primary_span] @@ -13,7 +13,7 @@ pub struct FerrisIdentifier { pub first_span: Span, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::emoji_identifier)] pub struct EmojiIdentifier { #[primary_span] @@ -21,67 +21,67 @@ pub struct EmojiIdentifier { pub ident: Symbol, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::mixed_bin_crate)] pub struct MixedBinCrate; -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::mixed_proc_macro_crate)] pub struct MixedProcMacroCrate; -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::proc_macro_doc_without_arg)] pub struct ProcMacroDocWithoutArg; -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::error_writing_dependencies)] pub struct ErrorWritingDependencies<'a> { pub path: &'a Path, pub error: io::Error, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::input_file_would_be_overwritten)] pub struct InputFileWouldBeOverWritten<'a> { pub path: &'a Path, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::generated_file_conflicts_with_directory)] pub struct GeneratedFileConflictsWithDirectory<'a> { pub input_path: &'a Path, pub dir_path: &'a Path, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::temps_dir_error)] pub struct TempsDirError; -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::out_dir_error)] pub struct OutDirError; -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::cant_emit_mir)] pub struct CantEmitMIR { pub error: io::Error, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::rustc_error_fatal)] pub struct RustcErrorFatal { #[primary_span] pub span: Span, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::rustc_error_unexpected_annotation)] pub struct RustcErrorUnexpectedAnnotation { #[primary_span] pub span: Span, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(interface::failed_writing_file)] pub struct FailedWritingFile<'a> { pub path: &'a Path, -- cgit 1.4.1-3-g733a5