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> {
6060 Event :: InlineHtml ( _) | Event :: Start ( Tag :: Image { .. } ) | Event :: End ( TagEnd :: Image ) => {
6161 text_offset = None ;
6262 } ,
63- Event :: Text ( ..) | Event :: Start ( Tag :: Link { .. } ) | Event :: End ( TagEnd :: Link )
63+ Event :: Code ( .. ) | Event :: Text ( ..) | Event :: Start ( Tag :: Link { .. } ) | Event :: End ( TagEnd :: Link )
6464 if no_report_depth == 0 && !offset. is_empty ( ) =>
6565 {
6666 text_offset = Some ( offset) ;
Original file line number Diff line number Diff line change @@ -141,6 +141,10 @@ struct OnlyLastSentence;
141141/// ```
142142struct IncompleteBlockCode;
143143
144+ /// This ends with a code `span`.
145+ //~^ doc_comments_missing_terminal_punctuation
146+ struct CodeSpan;
147+
144148#[expect(clippy::empty_docs)]
145149///
146150struct EmptyDocComment;
Original file line number Diff line number Diff line change @@ -141,6 +141,10 @@ struct OnlyLastSentence;
141141/// ```
142142struct IncompleteBlockCode ;
143143
144+ /// This ends with a code `span`
145+ //~^ doc_comments_missing_terminal_punctuation
146+ struct CodeSpan ;
147+
144148#[ expect( clippy:: empty_docs) ]
145149///
146150struct EmptyDocComment ;
Original file line number Diff line number Diff line change @@ -86,10 +86,16 @@ LL | /// Only the last sentence is
8686 | ^ help: end the doc comment with some punctuation: `.`
8787
8888error: 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
9096 |
9197LL | * Block doc comments work
9298 | ^ help: end the doc comment with some punctuation: `.`
9399
94- error: aborting due to 15 previous errors
100+ error: aborting due to 16 previous errors
95101
You can’t perform that action at this time.
0 commit comments