@@ -44,7 +44,7 @@ pub fn check(cx: &LateContext<'_>, doc: &str, range: Range<usize>, fragments: &F
4444 "looks like a footnote ref, but has no matching footnote" ,
4545 |diag| {
4646 if last_doc_attr. is_doc_comment ( ) {
47- let ( pfx , sfx ) = match ( last_doc_attr_comment_kind, last_doc_attr. style ( ) ) {
47+ let ( to_add , terminator ) = match ( last_doc_attr_comment_kind, last_doc_attr. style ( ) ) {
4848 ( CommentKind :: Line , AttrStyle :: Outer ) => ( "\n ///\n /// " , "" ) ,
4949 ( CommentKind :: Line , AttrStyle :: Inner ) => ( "\n //!\n //! " , "" ) ,
5050 ( CommentKind :: Block , AttrStyle :: Outer ) => ( "\n /** " , " */" ) ,
@@ -53,7 +53,7 @@ pub fn check(cx: &LateContext<'_>, doc: &str, range: Range<usize>, fragments: &F
5353 diag. span_suggestion_verbose (
5454 last_doc_attr. span ( ) . shrink_to_hi ( ) ,
5555 "add footnote definition" ,
56- format ! ( "{pfx }{label}: <!-- description -->{sfx }" , label = & doc[ start..end] ) ,
56+ format ! ( "{to_add }{label}: <!-- description -->{terminator }" , label = & doc[ start..end] ) ,
5757 Applicability :: HasPlaceholders ,
5858 ) ;
5959 } else {
0 commit comments