From 9ec051d3b37ccd7c89781f7319d58dce19f6fa23 Mon Sep 17 00:00:00 2001 From: Ergenekon Yigit Date: Thu, 28 Apr 2016 11:22:11 +0300 Subject: [PATCH 1/2] update comments RFC and code snippets --- src/doc/style/style/comments.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/doc/style/style/comments.md b/src/doc/style/style/comments.md index bf8cf653dbb16..af02d87cc8da8 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. From 0e698ed2c6b53a09dd03cafaa28e54f1cbd7f75b Mon Sep 17 00:00:00 2001 From: Ergenekon Yigit Date: Thu, 28 Apr 2016 11:22:54 +0300 Subject: [PATCH 2/2] update features RFC --- src/doc/style/style/features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/style/style/features.md b/src/doc/style/style/features.md index 578270fbdc256..13cc37fc236ca 100644 --- a/src/doc/style/style/features.md +++ b/src/doc/style/style/features.md @@ -1,4 +1,4 @@ -## `return` [FIXME: needs RFC] +## `return` [RFC #968] Terminate `return` statements with semicolons: