@@ -18,7 +18,7 @@ use super::utils::SubdiagnosticVariant;
1818
1919/// What kind of diagnostic is being derived - a fatal/error/warning or a lint?
2020#[ derive( Clone , Copy , PartialEq , Eq ) ]
21- pub ( crate ) enum DiagnosticDeriveKind {
21+ pub ( crate ) enum DiagDeriveKind {
2222 Diagnostic ,
2323 LintDiagnostic ,
2424}
@@ -28,7 +28,7 @@ pub(crate) enum DiagnosticDeriveKind {
2828/// fatal/errors/warnings and `LintDiagnostic` for lints.
2929pub ( crate ) struct DiagnosticDeriveVariantBuilder {
3030 /// The kind for the entire type.
31- pub kind : DiagnosticDeriveKind ,
31+ pub kind : DiagDeriveKind ,
3232
3333 /// Initialization of format strings for code suggestions.
3434 pub formatting_init : TokenStream ,
@@ -55,7 +55,7 @@ impl HasFieldMap for DiagnosticDeriveVariantBuilder {
5555 }
5656}
5757
58- impl DiagnosticDeriveKind {
58+ impl DiagDeriveKind {
5959 /// Call `f` for the struct or for each variant of the enum, returning a `TokenStream` with the
6060 /// tokens from `f` wrapped in an `match` expression. Emits errors for use of derive on unions
6161 /// or attributes on the type itself when input is an enum.
@@ -316,14 +316,14 @@ impl DiagnosticDeriveVariantBuilder {
316316 ( Meta :: Path ( _) , "skip_arg" ) => return Ok ( quote ! { } ) ,
317317 ( Meta :: Path ( _) , "primary_span" ) => {
318318 match self . kind {
319- DiagnosticDeriveKind :: Diagnostic => {
319+ DiagDeriveKind :: Diagnostic => {
320320 report_error_if_not_applied_to_span ( attr, & info) ?;
321321
322322 return Ok ( quote ! {
323323 diag. span( #binding) ;
324324 } ) ;
325325 }
326- DiagnosticDeriveKind :: LintDiagnostic => {
326+ DiagDeriveKind :: LintDiagnostic => {
327327 throw_invalid_attr ! ( attr, |diag| {
328328 diag. help( "the `primary_span` field attribute is not valid for lint diagnostics" )
329329 } )
0 commit comments