about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/empty_line_after/doc_comments.stderr
blob: ae8cb91ba12f7850a9423ee49a0e0410cf5bc1db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
error: empty line after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:6:1
   |
LL | / /// for the crate
LL | |
   | |_^
LL |   fn first_in_crate() {}
   |   ----------------- the comment documents this function
   |
   = note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
   = help: if the empty line is unintentional, remove it
help: if the comment should document the crate use an inner doc comment
   |
LL ~ //! Meant to be an
LL ~ //! inner doc comment
LL ~ //! for the crate
   |

error: empty line after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:14:5
   |
LL | /     /// for the module
LL | |
   | |_^
LL |       fn first_in_module() {}
   |       ------------------ the comment documents this function
   |
   = help: if the empty line is unintentional, remove it
help: if the comment should document the parent module use an inner doc comment
   |
LL ~     //! Meant to be an
LL ~     //! inner doc comment
LL ~     //! for the module
   |

error: empty line after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:27:5
   |
LL | /     /// # Indented
LL | |
   | |_^
LL |       /// Blank line
LL |       fn indented() {}
   |       ----------- the comment documents this function
   |
   = help: if the empty line is unintentional, remove it
help: if the documentation should include the empty line include it in the comment
   |
LL |     ///
   |

error: empty line after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:34:1
   |
LL | / /// This should produce a warning
LL | |
   | |_^
LL |   fn with_doc_and_newline() {}
   |   ----------------------- the comment documents this function
   |
   = help: if the empty line is unintentional, remove it

error: empty lines after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:44:1
   |
LL | / /// This doc comment should produce a warning
LL | |
LL | | /** This is also a doc comment and is part of the warning
LL | |  */
LL | |
   | |_^
...
LL |   fn three_attributes() {}
   |   ------------------- the comment documents this function
   |
   = help: if the empty lines are unintentional, remove them

error: empty line after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:56:5
   |
LL | /     /// docs for `old_code`
LL | |     // fn old_code() {}
LL | |
   | |_^
LL |       fn new_code() {}
   |       ----------- the comment documents this function
   |
   = help: if the empty line is unintentional, remove it
help: if the doc comment should not document function `new_code` then comment it out
   |
LL |     // /// docs for `old_code`
   |     ++

error: empty lines after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:63:5
   |
LL | /     /// for OldA
LL | |     // struct OldA;
LL | |
LL | |     /// Docs
...  |
LL | |
   | |_^
...
LL |       struct Multiple;
   |       --------------- the comment documents this struct
   |
   = help: if the empty lines are unintentional, remove them
help: if the doc comment should not document struct `Multiple` then comment it out
   |
LL ~     // /// Docs
LL ~     // /// for OldA
LL |     // struct OldA;
LL |
LL ~     // /// Docs
LL ~     // /// for OldB
   |

error: empty line after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:78:5
   |
LL | /     /**
LL | |      * Meant to be inner doc comment
LL | |      */
LL | |
   | |_^
LL |       fn first_in_module() {}
   |       ------------------ the comment documents this function
   |
   = help: if the empty line is unintentional, remove it
help: if the comment should document the parent module use an inner doc comment
   |
LL -     /**
LL +     /*!
   |

error: empty line after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:85:5
   |
LL | /     /**
LL | |      * Docs for `old_code`
LL | |      */
LL | |     /* fn old_code() {} */
LL | |
   | |_^
...
LL |       fn new_code() {}
   |       ----------- the comment documents this function
   |
   = help: if the empty line is unintentional, remove it
help: if the doc comment should not document function `new_code` then comment it out
   |
LL -     /**
LL +     /*
   |

error: empty line after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:96:5
   |
LL | /     /// Docs for `old_code2`
LL | |     /* fn old_code2() {} */
LL | |
   | |_^
LL |       /// Docs for `new_code2`
LL |       fn new_code2() {}
   |       ------------ the comment documents this function
   |
   = help: if the empty line is unintentional, remove it
help: if the doc comment should not document function `new_code2` then comment it out
   |
LL |     // /// Docs for `old_code2`
   |     ++

error: empty line after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:152:5
   |
LL | /     /// comment on assoc item
LL | |
LL | |
   | |_^
LL |       fn bar() {}
   |       ------ the comment documents this function
   |
   = help: if the empty line is unintentional, remove it
help: if the doc comment should not document function `bar` then comment it out
   |
LL |     // /// comment on assoc item
   |     ++

error: empty line after doc comment
  --> tests/ui/empty_line_after/doc_comments.rs:159:1
   |
LL | / /// Docs for this item.
LL | | // fn some_item() {}
LL | |
   | |_^
LL |   impl LineComment {} // or any other nameless item kind
   |   - the comment documents this implementation
   |
   = help: if the empty line is unintentional, remove it
help: if the doc comment should not document the following item then comment it out
   |
LL | // /// Docs for this item.
   | ++

error: aborting due to 12 previous errors