Skip to content

Commit 3a0efff

Browse files
committed
Rollup merge of rust-lang#33253 - ergenekonyigit:master, r=alexcrichton
rustdoc: fixed some RFCs r? @alexcrichton
2 parents 13c1956 + 0e698ed commit 3a0efff

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

Diff for: src/doc/style/style/comments.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Comments [FIXME: needs RFC]
1+
% Comments [RFC #505]
22

33
### Avoid block comments.
44

@@ -74,7 +74,25 @@ For example:
7474

7575
### Code snippets
7676

77-
> **[FIXME]**
77+
Only use inner doc comments `//!` to write crate and module-level documentation,
78+
nothing else. When using `mod` blocks, prefer `///` outside of the block:
79+
80+
```rust
81+
/// This module contains tests
82+
mod test {
83+
// ...
84+
}
85+
```
86+
87+
over
88+
89+
```rust
90+
mod test {
91+
//! This module contains tests
92+
93+
// ...
94+
}
95+
```
7896

7997
### Avoid inner doc comments.
8098

Diff for: src/doc/style/style/features.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## `return` [FIXME: needs RFC]
1+
## `return` [RFC #968]
22

33
Terminate `return` statements with semicolons:
44

0 commit comments

Comments
 (0)