File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ fn is_missing_punctuation(doc_string: &str) -> Option<usize> {
60
60
Event :: InlineHtml ( _) | Event :: Start ( Tag :: Image { .. } ) | Event :: End ( TagEnd :: Image ) => {
61
61
text_offset = None ;
62
62
} ,
63
- Event :: Text ( ..) | Event :: Start ( Tag :: Link { .. } ) | Event :: End ( TagEnd :: Link )
63
+ Event :: Code ( .. ) | Event :: Text ( ..) | Event :: Start ( Tag :: Link { .. } ) | Event :: End ( TagEnd :: Link )
64
64
if no_report_depth == 0 && !offset. is_empty ( ) =>
65
65
{
66
66
text_offset = Some ( offset) ;
Original file line number Diff line number Diff line change @@ -141,6 +141,10 @@ struct OnlyLastSentence;
141
141
/// ```
142
142
struct IncompleteBlockCode;
143
143
144
+ /// This ends with a code `span`.
145
+ //~^ doc_comments_missing_terminal_punctuation
146
+ struct CodeSpan;
147
+
144
148
#[expect(clippy::empty_docs)]
145
149
///
146
150
struct EmptyDocComment;
Original file line number Diff line number Diff line change @@ -141,6 +141,10 @@ struct OnlyLastSentence;
141
141
/// ```
142
142
struct IncompleteBlockCode ;
143
143
144
+ /// This ends with a code `span`
145
+ //~^ doc_comments_missing_terminal_punctuation
146
+ struct CodeSpan ;
147
+
144
148
#[ expect( clippy:: empty_docs) ]
145
149
///
146
150
struct EmptyDocComment ;
Original file line number Diff line number Diff line change @@ -86,10 +86,16 @@ LL | /// Only the last sentence is
86
86
| ^ help: end the doc comment with some punctuation: `.`
87
87
88
88
error: doc comments should end with a terminal punctuation mark
89
- --> tests/ui/doc/doc_comments_missing_terminal_punctuation.rs:149:27
89
+ --> tests/ui/doc/doc_comments_missing_terminal_punctuation.rs:144:33
90
+ |
91
+ LL | /// This ends with a code `span`
92
+ | ^ help: end the doc comment with some punctuation: `.`
93
+
94
+ error: doc comments should end with a terminal punctuation mark
95
+ --> tests/ui/doc/doc_comments_missing_terminal_punctuation.rs:153:27
90
96
|
91
97
LL | * Block doc comments work
92
98
| ^ help: end the doc comment with some punctuation: `.`
93
99
94
- error: aborting due to 15 previous errors
100
+ error: aborting due to 16 previous errors
95
101
You can’t perform that action at this time.
0 commit comments