UPDATE - rename DiagnosticHandler macro to Diagnostic
This commit is contained in:
parent
191fac6826
commit
a3396b2070
34 changed files with 484 additions and 484 deletions
|
@ -12,7 +12,7 @@ use quote::format_ident;
|
|||
use subdiagnostic::SessionSubdiagnosticDerive;
|
||||
use synstructure::Structure;
|
||||
|
||||
/// Implements `#[derive(DiagnosticHandler)]`, which allows for errors to be specified as a struct,
|
||||
/// Implements `#[derive(Diagnostic)]`, 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(DiagnosticHandler)]
|
||||
/// #[derive(Diagnostic)]
|
||||
/// #[diag(borrowck::move_out_of_borrow, code = "E0505")]
|
||||
/// pub struct MoveOutOfBorrowError<'tcx> {
|
||||
/// pub name: Ident,
|
||||
|
@ -56,7 +56,7 @@ use synstructure::Structure;
|
|||
/// });
|
||||
/// ```
|
||||
///
|
||||
/// See rustc dev guide for more examples on using the `#[derive(DiagnosticHandler)]`:
|
||||
/// See rustc dev guide for more examples on using the `#[derive(Diagnostic)]`:
|
||||
/// <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!("handler"), s).into_tokens()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue