diff options
| author | Jhonny Bill Mena <jhonnybillm@gmail.com> | 2022-09-18 11:45:41 -0400 |
|---|---|---|
| committer | Jhonny Bill Mena <jhonnybillm@gmail.com> | 2022-09-21 11:39:52 -0400 |
| commit | 19b348fed44342d8addbbb5e8f67cda5dc8d9b95 (patch) | |
| tree | 08bc0d9e7f50ba3a3eb8f227ce9f1e82904a6cb5 /compiler/rustc_query_system/src | |
| parent | 5b8152807cae152d5c7cfb40615e5a817a6cf750 (diff) | |
| download | rust-19b348fed44342d8addbbb5e8f67cda5dc8d9b95.tar.gz rust-19b348fed44342d8addbbb5e8f67cda5dc8d9b95.zip | |
UPDATE - rename DiagnosticHandler trait to IntoDiagnostic
Diffstat (limited to 'compiler/rustc_query_system/src')
| -rw-r--r-- | compiler/rustc_query_system/src/error.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_query_system/src/query/job.rs | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rustc_query_system/src/error.rs b/compiler/rustc_query_system/src/error.rs index bececca7585..97a74517f68 100644 --- a/compiler/rustc_query_system/src/error.rs +++ b/compiler/rustc_query_system/src/error.rs @@ -1,4 +1,4 @@ -use rustc_errors::AddSubdiagnostic; +use rustc_errors::AddToDiagnostic; use rustc_session::Limit; use rustc_span::{Span, Symbol}; @@ -7,7 +7,7 @@ pub struct CycleStack { pub desc: String, } -impl AddSubdiagnostic for CycleStack { +impl AddToDiagnostic for CycleStack { fn add_to_diagnostic(self, diag: &mut rustc_errors::Diagnostic) { diag.span_note(self.span, &format!("...which requires {}...", self.desc)); } @@ -46,7 +46,7 @@ pub struct CycleUsage { pub usage: String, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(query_system::cycle, code = "E0391")] pub struct Cycle { #[primary_span] @@ -62,11 +62,11 @@ pub struct Cycle { pub cycle_usage: Option<CycleUsage>, } -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(query_system::reentrant)] pub struct Reentrant; -#[derive(SessionDiagnostic)] +#[derive(DiagnosticHandler)] #[diag(query_system::increment_compilation)] #[help] #[note(query_system::increment_compilation_note1)] @@ -76,7 +76,7 @@ pub struct IncrementCompilation { pub dep_node: String, } -#[derive(SessionDiagnostic)] +#[derive(Diagnostic)] #[help] #[diag(query_system::query_overflow)] pub struct QueryOverflow { @@ -88,7 +88,7 @@ pub struct QueryOverflow { pub crate_name: Symbol, } -#[derive(SessionSubdiagnostic)] +#[derive(Subdiagnostic)] #[note(query_system::layout_of_depth)] pub struct LayoutOfDepth { pub desc: String, diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs index 705305ff806..6d26c8f47f3 100644 --- a/compiler/rustc_query_system/src/query/job.rs +++ b/compiler/rustc_query_system/src/query/job.rs @@ -4,7 +4,7 @@ use crate::query::{QueryContext, QueryStackFrame}; use rustc_data_structures::fx::FxHashMap; use rustc_errors::{ - Diagnostic, DiagnosticBuilder, ErrorGuaranteed, Handler, Level, SessionDiagnostic, + Diagnostic, DiagnosticBuilder, IntoDiagnostic, ErrorGuaranteed, Handler, Level, }; use rustc_hir::def::DefKind; use rustc_session::Session; |
