@@ -592,20 +592,20 @@ pub(super) enum SubdiagKind {
592
592
} ,
593
593
}
594
594
595
- pub ( super ) struct SubdiagnosticVariant {
595
+ pub ( super ) struct SubdiagVariant {
596
596
pub ( super ) kind : SubdiagKind ,
597
597
pub ( super ) slug : Option < Path > ,
598
598
pub ( super ) no_span : bool ,
599
599
}
600
600
601
- impl SubdiagnosticVariant {
602
- /// Constructs a `SubdiagnosticVariant ` from a field or type attribute such as `#[note]`,
601
+ impl SubdiagVariant {
602
+ /// Constructs a `SubdiagVariant ` from a field or type attribute such as `#[note]`,
603
603
/// `#[error(parser::add_paren, no_span)]` or `#[suggestion(code = "...")]`. Returns the
604
604
/// `SubdiagKind` and the diagnostic slug, if specified.
605
605
pub ( super ) fn from_attr (
606
606
attr : & Attribute ,
607
607
fields : & impl HasFieldMap ,
608
- ) -> Result < Option < SubdiagnosticVariant > , DiagDeriveError > {
608
+ ) -> Result < Option < SubdiagVariant > , DiagDeriveError > {
609
609
// Always allow documentation comments.
610
610
if is_doc_comment ( attr) {
611
611
return Ok ( None ) ;
@@ -680,7 +680,7 @@ impl SubdiagnosticVariant {
680
680
| SubdiagKind :: Help
681
681
| SubdiagKind :: Warn
682
682
| SubdiagKind :: MultipartSuggestion { .. } => {
683
- return Ok ( Some ( SubdiagnosticVariant { kind, slug : None , no_span : false } ) ) ;
683
+ return Ok ( Some ( SubdiagVariant { kind, slug : None , no_span : false } ) ) ;
684
684
}
685
685
SubdiagKind :: Suggestion { .. } => {
686
686
throw_span_err ! ( span, "suggestion without `code = \" ...\" `" )
@@ -830,7 +830,7 @@ impl SubdiagnosticVariant {
830
830
SubdiagKind :: Label | SubdiagKind :: Note | SubdiagKind :: Help | SubdiagKind :: Warn => { }
831
831
}
832
832
833
- Ok ( Some ( SubdiagnosticVariant { kind, slug, no_span } ) )
833
+ Ok ( Some ( SubdiagVariant { kind, slug, no_span } ) )
834
834
}
835
835
}
836
836
0 commit comments