@@ -44,7 +44,7 @@ pub fn check(cx: &LateContext<'_>, doc: &str, range: Range<usize>, fragments: &F
44
44
"looks like a footnote ref, but has no matching footnote" ,
45
45
|diag| {
46
46
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 ( ) ) {
48
48
( CommentKind :: Line , AttrStyle :: Outer ) => ( "\n ///\n /// " , "" ) ,
49
49
( CommentKind :: Line , AttrStyle :: Inner ) => ( "\n //!\n //! " , "" ) ,
50
50
( CommentKind :: Block , AttrStyle :: Outer ) => ( "\n /** " , " */" ) ,
@@ -53,7 +53,7 @@ pub fn check(cx: &LateContext<'_>, doc: &str, range: Range<usize>, fragments: &F
53
53
diag. span_suggestion_verbose (
54
54
last_doc_attr. span ( ) . shrink_to_hi ( ) ,
55
55
"add footnote definition" ,
56
- format ! ( "{pfx }{label}: <!-- description -->{sfx }" , label = & doc[ start..end] ) ,
56
+ format ! ( "{to_add }{label}: <!-- description -->{terminator }" , label = & doc[ start..end] ) ,
57
57
Applicability :: HasPlaceholders ,
58
58
) ;
59
59
} else {
0 commit comments