about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/errors.rs
diff options
context:
space:
mode:
authorJhonny Bill Mena <jhonnybillm@gmail.com>2022-09-18 11:46:56 -0400
committerJhonny Bill Mena <jhonnybillm@gmail.com>2022-09-21 11:39:53 -0400
commita3396b207093c01065b63b0c58f1e6654629166d (patch)
tree7d2b5bd979e9a1da8a2e10404676004876edc147 /compiler/rustc_const_eval/src/errors.rs
parent191fac68266b73158ff048c83556ea91cbf977fd (diff)
downloadrust-a3396b207093c01065b63b0c58f1e6654629166d.tar.gz
rust-a3396b207093c01065b63b0c58f1e6654629166d.zip
UPDATE - rename DiagnosticHandler macro to Diagnostic
Diffstat (limited to 'compiler/rustc_const_eval/src/errors.rs')
-rw-r--r--compiler/rustc_const_eval/src/errors.rs44
1 files changed, 22 insertions, 22 deletions
diff --git a/compiler/rustc_const_eval/src/errors.rs b/compiler/rustc_const_eval/src/errors.rs
index d0b94e91abf..c6cb7a8b961 100644
--- a/compiler/rustc_const_eval/src/errors.rs
+++ b/compiler/rustc_const_eval/src/errors.rs
@@ -1,8 +1,8 @@
 use rustc_hir::ConstContext;
-use rustc_macros::DiagnosticHandler;
+use rustc_macros::Diagnostic;
 use rustc_span::Span;
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::unstable_in_stable)]
 pub(crate) struct UnstableInStable {
     pub gate: String,
@@ -21,14 +21,14 @@ pub(crate) struct UnstableInStable {
     pub attr_span: Span,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::thread_local_access, code = "E0625")]
 pub(crate) struct NonConstOpErr {
     #[primary_span]
     pub span: Span,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::static_access, code = "E0013")]
 #[help]
 pub(crate) struct StaticAccessErr {
@@ -40,7 +40,7 @@ pub(crate) struct StaticAccessErr {
     pub teach: Option<()>,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::raw_ptr_to_int)]
 #[note]
 #[note(const_eval::note2)]
@@ -49,7 +49,7 @@ pub(crate) struct RawPtrToIntErr {
     pub span: Span,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::raw_ptr_comparison)]
 #[note]
 pub(crate) struct RawPtrComparisonErr {
@@ -57,14 +57,14 @@ pub(crate) struct RawPtrComparisonErr {
     pub span: Span,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::panic_non_str)]
 pub(crate) struct PanicNonStrErr {
     #[primary_span]
     pub span: Span,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::mut_deref, code = "E0658")]
 pub(crate) struct MutDerefErr {
     #[primary_span]
@@ -72,7 +72,7 @@ pub(crate) struct MutDerefErr {
     pub kind: ConstContext,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::transient_mut_borrow, code = "E0658")]
 pub(crate) struct TransientMutBorrowErr {
     #[primary_span]
@@ -80,7 +80,7 @@ pub(crate) struct TransientMutBorrowErr {
     pub kind: ConstContext,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::transient_mut_borrow_raw, code = "E0658")]
 pub(crate) struct TransientMutBorrowErrRaw {
     #[primary_span]
@@ -88,7 +88,7 @@ pub(crate) struct TransientMutBorrowErrRaw {
     pub kind: ConstContext,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::max_num_nodes_in_const)]
 pub(crate) struct MaxNumNodesInConstErr {
     #[primary_span]
@@ -96,7 +96,7 @@ pub(crate) struct MaxNumNodesInConstErr {
     pub global_const_id: String,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::unallowed_fn_pointer_call)]
 pub(crate) struct UnallowedFnPointerCall {
     #[primary_span]
@@ -104,7 +104,7 @@ pub(crate) struct UnallowedFnPointerCall {
     pub kind: ConstContext,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::unstable_const_fn)]
 pub(crate) struct UnstableConstFn {
     #[primary_span]
@@ -112,7 +112,7 @@ pub(crate) struct UnstableConstFn {
     pub def_path: String,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::unallowed_mutable_refs, code = "E0764")]
 pub(crate) struct UnallowedMutableRefs {
     #[primary_span]
@@ -122,7 +122,7 @@ pub(crate) struct UnallowedMutableRefs {
     pub teach: Option<()>,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::unallowed_mutable_refs_raw, code = "E0764")]
 pub(crate) struct UnallowedMutableRefsRaw {
     #[primary_span]
@@ -131,7 +131,7 @@ pub(crate) struct UnallowedMutableRefsRaw {
     #[note(const_eval::teach_note)]
     pub teach: Option<()>,
 }
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::non_const_fmt_macro_call, code = "E0015")]
 pub(crate) struct NonConstFmtMacroCall {
     #[primary_span]
@@ -139,7 +139,7 @@ pub(crate) struct NonConstFmtMacroCall {
     pub kind: ConstContext,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::non_const_fn_call, code = "E0015")]
 pub(crate) struct NonConstFnCall {
     #[primary_span]
@@ -148,7 +148,7 @@ pub(crate) struct NonConstFnCall {
     pub kind: ConstContext,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::unallowed_op_in_const_context)]
 pub(crate) struct UnallowedOpInConstContext {
     #[primary_span]
@@ -156,7 +156,7 @@ pub(crate) struct UnallowedOpInConstContext {
     pub msg: String,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::unallowed_heap_allocations, code = "E0010")]
 pub(crate) struct UnallowedHeapAllocations {
     #[primary_span]
@@ -167,7 +167,7 @@ pub(crate) struct UnallowedHeapAllocations {
     pub teach: Option<()>,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::unallowed_inline_asm, code = "E0015")]
 pub(crate) struct UnallowedInlineAsm {
     #[primary_span]
@@ -175,7 +175,7 @@ pub(crate) struct UnallowedInlineAsm {
     pub kind: ConstContext,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::interior_mutable_data_refer, code = "E0492")]
 pub(crate) struct InteriorMutableDataRefer {
     #[primary_span]
@@ -188,7 +188,7 @@ pub(crate) struct InteriorMutableDataRefer {
     pub teach: Option<()>,
 }
 
-#[derive(DiagnosticHandler)]
+#[derive(Diagnostic)]
 #[diag(const_eval::interior_mutability_borrow)]
 pub(crate) struct InteriorMutabilityBorrow {
     #[primary_span]