about summary refs log tree commit diff
path: root/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs
diff options
context:
space:
mode:
authorJhonny Bill Mena <jhonnybillm@gmail.com>2022-09-18 11:45:41 -0400
committerJhonny Bill Mena <jhonnybillm@gmail.com>2022-09-21 11:39:52 -0400
commit19b348fed44342d8addbbb5e8f67cda5dc8d9b95 (patch)
tree08bc0d9e7f50ba3a3eb8f227ce9f1e82904a6cb5 /compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs
parent5b8152807cae152d5c7cfb40615e5a817a6cf750 (diff)
downloadrust-19b348fed44342d8addbbb5e8f67cda5dc8d9b95.tar.gz
rust-19b348fed44342d8addbbb5e8f67cda5dc8d9b95.zip
UPDATE - rename DiagnosticHandler trait to IntoDiagnostic
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs')
-rw-r--r--compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs b/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs
index 2a4fe48a8ac..4af3fd23624 100644
--- a/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs
+++ b/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs
@@ -21,12 +21,12 @@ use synstructure::{BindingInfo, Structure};
 /// What kind of diagnostic is being derived - a fatal/error/warning or a lint?
 #[derive(Copy, Clone, PartialEq, Eq)]
 pub(crate) enum DiagnosticDeriveKind {
-    SessionDiagnostic,
+    DiagnosticHandler,
     LintDiagnostic,
 }
 
 /// Tracks persistent information required for building up individual calls to diagnostic methods
-/// for generated diagnostic derives - both `SessionDiagnostic` for fatal/errors/warnings and
+/// for generated diagnostic derives - both `DiagnosticHandler` for fatal/errors/warnings and
 /// `LintDiagnostic` for lints.
 pub(crate) struct DiagnosticDeriveBuilder {
     /// The identifier to use for the generated `DiagnosticBuilder` instance.
@@ -333,7 +333,7 @@ impl DiagnosticDeriveBuilder {
             }
             "primary_span" => {
                 match self.kind {
-                    DiagnosticDeriveKind::SessionDiagnostic => {
+                    DiagnosticDeriveKind::DiagnosticHandler => {
                         report_error_if_not_applied_to_span(attr, &info)?;
 
                         Ok(quote! {