diff options
| author | Ergenekon Yigit <ergenekonyigit@hotmail.com> | 2016-04-28 11:22:11 +0300 |
|---|---|---|
| committer | Ergenekon Yigit <ergenekonyigit@hotmail.com> | 2016-04-28 11:22:11 +0300 |
| commit | 9ec051d3b37ccd7c89781f7319d58dce19f6fa23 (patch) | |
| tree | a9a6a35e9fab903541f98f0e6638b8fa8791fecf | |
| parent | 435095f32af93d27baf1390fa34e7dfff5eb7d5d (diff) | |
| download | rust-9ec051d3b37ccd7c89781f7319d58dce19f6fa23.tar.gz rust-9ec051d3b37ccd7c89781f7319d58dce19f6fa23.zip | |
update comments RFC and code snippets
| -rw-r--r-- | src/doc/style/style/comments.md | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/doc/style/style/comments.md b/src/doc/style/style/comments.md index bf8cf653dbb..af02d87cc8d 100644 --- a/src/doc/style/style/comments.md +++ b/src/doc/style/style/comments.md @@ -1,4 +1,4 @@ -% Comments [FIXME: needs RFC] +% Comments [RFC #505] ### Avoid block comments. @@ -74,7 +74,25 @@ For example: ### Code snippets -> **[FIXME]** +Only use inner doc comments `//!` to write crate and module-level documentation, +nothing else. When using `mod` blocks, prefer `///` outside of the block: + +```rust +/// This module contains tests +mod test { + // ... +} +``` + +over + +```rust +mod test { + //! This module contains tests + + // ... +} +``` ### Avoid inner doc comments. |
