diff options
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/mod.rs')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/mod.rs b/compiler/rustc_macros/src/diagnostics/mod.rs index 2ff21e18ff8..162089c881e 100644 --- a/compiler/rustc_macros/src/diagnostics/mod.rs +++ b/compiler/rustc_macros/src/diagnostics/mod.rs @@ -12,7 +12,7 @@ use quote::format_ident; use subdiagnostic::SessionSubdiagnosticDerive; use synstructure::Structure; -/// Implements `#[derive(SessionDiagnostic)]`, which allows for errors to be specified as a struct, +/// Implements `#[derive(DiagnosticHandler)]`, which allows for errors to be specified as a struct, /// independent from the actual diagnostics emitting code. /// /// ```ignore (rust) @@ -22,7 +22,7 @@ use synstructure::Structure; /// # use rustc_span::{symbol::Ident, Span}; /// # extern crate rust_middle; /// # use rustc_middle::ty::Ty; -/// #[derive(SessionDiagnostic)] +/// #[derive(DiagnosticHandler)] /// #[diag(borrowck::move_out_of_borrow, code = "E0505")] /// pub struct MoveOutOfBorrowError<'tcx> { /// pub name: Ident, @@ -56,10 +56,10 @@ use synstructure::Structure; /// }); /// ``` /// -/// See rustc dev guide for more examples on using the `#[derive(SessionDiagnostic)]`: +/// See rustc dev guide for more examples on using the `#[derive(DiagnosticHandler)]`: /// <https://rustc-dev-guide.rust-lang.org/diagnostics/diagnostic-structs.html> pub fn session_diagnostic_derive(s: Structure<'_>) -> TokenStream { - SessionDiagnosticDerive::new(format_ident!("diag"), format_ident!("sess"), s).into_tokens() + SessionDiagnosticDerive::new(format_ident!("diag"), format_ident!("handler"), s).into_tokens() } /// Implements `#[derive(LintDiagnostic)]`, which allows for lints to be specified as a struct, |
