mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 16:39:26 +00:00
0a4cfbf1f8
changelog: [`empty_line_after_doc_comments`]: add lint for checking empty lines after rustdoc comments. Fixes: #10395
36 lines
1.3 KiB
Text
36 lines
1.3 KiB
Text
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 `//`?
|
|
--> $DIR/empty_line_after_doc_comments.rs:18:1
|
|
|
|
|
LL | / /// This should produce a warning
|
|
LL | |
|
|
LL | | fn with_doc_and_newline() { assert!(true)}
|
|
| |_
|
|
|
|
|
= note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
|
|
|
|
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 `//`?
|
|
--> $DIR/empty_line_after_doc_comments.rs:68:1
|
|
|
|
|
LL | / /// This doc comment should produce a warning
|
|
LL | |
|
|
LL | | /** This is also a doc comment and should produce a warning
|
|
LL | | */
|
|
... |
|
|
LL | | #[allow(missing_docs)]
|
|
LL | | fn three_attributes() { assert!(true) }
|
|
| |_
|
|
|
|
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 `//`?
|
|
--> $DIR/empty_line_after_doc_comments.rs:70:1
|
|
|
|
|
LL | / /** This is also a doc comment and should produce a warning
|
|
LL | | */
|
|
LL | |
|
|
LL | | // This should *NOT* produce a warning
|
|
... |
|
|
LL | | #[allow(missing_docs)]
|
|
LL | | fn three_attributes() { assert!(true) }
|
|
| |_
|
|
|
|
error: aborting due to 3 previous errors
|
|
|