blob: a69da964aee393cca8da9e554c47f066fe9d3163 (
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
|
An inner doc comment was used in an invalid context.
Erroneous code example:
```compile_fail,E0753
fn foo() {}
//! foo
// ^ error!
fn main() {}
```
Inner document can only be used before items. For example:
```
//! A working comment applied to the module!
fn foo() {
//! Another working comment!
}
fn main() {}
```
In case you want to document the item following the doc comment, you might want
to use outer doc comment:
```
/// I am an outer doc comment
#[doc = "I am also an outer doc comment!"]
fn foo() {
// ...
}
```
|