You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #10691 - jdswensen:jds/fix-doc-empty-line, r=Jarcho
fix: warn on empty line outer AttrKind::DocComment
changelog: [`empty_line_after_doc_comments`]: add lint for checking empty lines after rustdoc comments.
Fixes: #10395
error: found an empty line after a doc comment. Perhaps you need to use `//!` to make a comment on a module, remove the empty line, or make a regular comment with `//`?
2
+
--> $DIR/empty_line_after_doc_comments.rs:18:1
3
+
|
4
+
LL | / /// This should produce a warning
5
+
LL | |
6
+
LL | | fn with_doc_and_newline() { assert!(true)}
7
+
| |_
8
+
|
9
+
= note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
10
+
11
+
error: found an empty line after a doc comment. Perhaps you need to use `//!` to make a comment on a module, remove the empty line, or make a regular comment with `//`?
12
+
--> $DIR/empty_line_after_doc_comments.rs:68:1
13
+
|
14
+
LL | / /// This doc comment should produce a warning
15
+
LL | |
16
+
LL | | /** This is also a doc comment and should produce a warning
17
+
LL | | */
18
+
... |
19
+
LL | | #[allow(missing_docs)]
20
+
LL | | fn three_attributes() { assert!(true) }
21
+
| |_
22
+
23
+
error: found an empty line after a doc comment. Perhaps you need to use `//!` to make a comment on a module, remove the empty line, or make a regular comment with `//`?
24
+
--> $DIR/empty_line_after_doc_comments.rs:70:1
25
+
|
26
+
LL | / /** This is also a doc comment and should produce a warning
0 commit comments