Rename IntoDiagnostic
as Diagnostic
.
To match `derive(Diagnostic)`. Also rename `into_diagnostic` as `into_diag`.
This commit is contained in:
parent
a09b1d33a7
commit
7a294e998b
28 changed files with 146 additions and 164 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue