]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0585.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0585.md
1 A documentation comment that doesn't document anything was found.
2
3 Erroneous code example:
4
5 ```compile_fail,E0585
6 fn main() {
7     // The following doc comment will fail:
8     /// This is a useless doc comment!
9 }
10 ```
11
12 Documentation comments need to be followed by items, including functions,
13 types, modules, etc. Examples:
14
15 ```
16 /// I'm documenting the following struct:
17 struct Foo;
18
19 /// I'm documenting the following function:
20 fn foo() {}
21 ```