@@ -5,11 +5,11 @@ LL | / /// for the crate
55LL | |
66 | |_^
77LL | fn first_in_crate() {}
8- | ------------------- the comment documents this function
8+ | ----------------- the comment documents this function
99 |
1010 = note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
1111 = help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
12- = help: if the empty line is unintentional remove it
12+ = help: if the empty line is unintentional, remove it
1313help: if the comment should document the crate use an inner doc comment
1414 |
1515LL ~ //! Meant to be an
@@ -24,9 +24,9 @@ LL | / /// for the module
2424LL | |
2525 | |_^
2626LL | fn first_in_module() {}
27- | -------------------- the comment documents this function
27+ | ------------------ the comment documents this function
2828 |
29- = help: if the empty line is unintentional remove it
29+ = help: if the empty line is unintentional, remove it
3030help: if the comment should document the parent module use an inner doc comment
3131 |
3232LL ~ //! Meant to be an
4242 | |_^
4343LL | /// Blank line
4444LL | fn indented() {}
45- | ------------- the comment documents this function
45+ | ----------- the comment documents this function
4646 |
47- = help: if the empty line is unintentional remove it
47+ = help: if the empty line is unintentional, remove it
4848help: if the documentation should include the empty line include it in the comment
4949 |
5050LL | ///
@@ -57,9 +57,9 @@ LL | / /// This should produce a warning
5757LL | |
5858 | |_^
5959LL | fn with_doc_and_newline() {}
60- | ------------------------- the comment documents this function
60+ | ----------------------- the comment documents this function
6161 |
62- = help: if the empty line is unintentional remove it
62+ = help: if the empty line is unintentional, remove it
6363
6464error: empty lines after doc comment
6565 --> tests/ui/empty_line_after/doc_comments.rs:44:1
7272 | |_^
7373...
7474LL | fn three_attributes() {}
75- | --------------------- the comment documents this function
75+ | ------------------- the comment documents this function
7676 |
77- = help: if the empty lines are unintentional remove them
77+ = help: if the empty lines are unintentional, remove them
7878
7979error: empty line after doc comment
8080 --> tests/ui/empty_line_after/doc_comments.rs:56:5
@@ -84,9 +84,9 @@ LL | | // fn old_code() {}
8484LL | |
8585 | |_^
8686LL | fn new_code() {}
87- | ------------- the comment documents this function
87+ | ----------- the comment documents this function
8888 |
89- = help: if the empty line is unintentional remove it
89+ = help: if the empty line is unintentional, remove it
9090help: if the doc comment should not document `new_code` comment it out
9191 |
9292LL | // /// docs for `old_code`
@@ -106,7 +106,7 @@ LL | |
106106LL | struct Multiple;
107107 | --------------- the comment documents this struct
108108 |
109- = help: if the empty lines are unintentional remove them
109+ = help: if the empty lines are unintentional, remove them
110110help: if the doc comment should not document `Multiple` comment it out
111111 |
112112LL ~ // /// Docs
@@ -126,9 +126,9 @@ LL | | */
126126LL | |
127127 | |_^
128128LL | fn first_in_module() {}
129- | -------------------- the comment documents this function
129+ | ------------------ the comment documents this function
130130 |
131- = help: if the empty line is unintentional remove it
131+ = help: if the empty line is unintentional, remove it
132132help: if the comment should document the parent module use an inner doc comment
133133 |
134134LL | /*!
@@ -145,9 +145,9 @@ LL | |
145145 | |_^
146146...
147147LL | fn new_code() {}
148- | ------------- the comment documents this function
148+ | ----------- the comment documents this function
149149 |
150- = help: if the empty line is unintentional remove it
150+ = help: if the empty line is unintentional, remove it
151151help: if the doc comment should not document `new_code` comment it out
152152 |
153153LL - /**
@@ -163,13 +163,24 @@ LL | |
163163 | |_^
164164LL | /// Docs for `new_code2`
165165LL | fn new_code2() {}
166- | -------------- the comment documents this function
166+ | ------------ the comment documents this function
167167 |
168- = help: if the empty line is unintentional remove it
168+ = help: if the empty line is unintentional, remove it
169169help: if the doc comment should not document `new_code2` comment it out
170170 |
171171LL | // /// Docs for `old_code2`
172172 | ++
173173
174- error: aborting due to 10 previous errors
174+ error: empty line after doc comment
175+ --> tests/ui/empty_line_after/doc_comments.rs:152:5
176+ |
177+ LL | / /// comment on assoc item
178+ LL | |
179+ | |_^
180+ LL | fn bar() {}
181+ | ------ the comment documents this function
182+ |
183+ = help: if the empty line is unintentional, remove it
184+
185+ error: aborting due to 11 previous errors
175186
0 commit comments