diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-06 11:02:56 +1100 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-11 09:15:09 +1100 | 
| commit | 7a294e998b66ea6d410a6840cba80347fc4764c2 (patch) | |
| tree | aa7a68bfbbb9177a06cda144baca657f4939996b /compiler/rustc_macros/src | |
| parent | a09b1d33a703d4ed412e70d3197e73ba7e0937f9 (diff) | |
| download | rust-7a294e998b66ea6d410a6840cba80347fc4764c2.tar.gz rust-7a294e998b66ea6d410a6840cba80347fc4764c2.zip | |
Rename `IntoDiagnostic` as `Diagnostic`.
To match `derive(Diagnostic)`. Also rename `into_diagnostic` as `into_diag`.
Diffstat (limited to 'compiler/rustc_macros/src')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/diagnostic.rs | 9 | 
1 files changed, 3 insertions, 6 deletions
| diff --git a/compiler/rustc_macros/src/diagnostics/diagnostic.rs b/compiler/rustc_macros/src/diagnostics/diagnostic.rs index a1a7b19642b..c28e096455f 100644 --- a/compiler/rustc_macros/src/diagnostics/diagnostic.rs +++ b/compiler/rustc_macros/src/diagnostics/diagnostic.rs @@ -10,7 +10,7 @@ use quote::quote; use syn::spanned::Spanned; use synstructure::Structure; -/// The central struct for constructing the `into_diagnostic` method from an annotated struct. +/// The central struct for constructing the `into_diag` method from an annotated struct. pub(crate) struct DiagnosticDerive<'a> { structure: Structure<'a>, } @@ -72,14 +72,11 @@ impl<'a> DiagnosticDerive<'a> { // A lifetime of `'a` causes conflicts, but `_sess` is fine. let mut imp = structure.gen_impl(quote! { - gen impl<'_sess, G> - rustc_errors::IntoDiagnostic<'_sess, G> - for @Self + gen impl<'_sess, G> rustc_errors::Diagnostic<'_sess, G> for @Self where G: rustc_errors::EmissionGuarantee { - #[track_caller] - fn into_diagnostic( + fn into_diag( self, dcx: &'_sess rustc_errors::DiagCtxt, level: rustc_errors::Level | 
