We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6d698f6 + cd48393 commit 4493e2cCopy full SHA for 4493e2c
1 file changed
06-flow/06-01-comment.md
@@ -21,24 +21,21 @@ let y = 6; // 创建另一个绑定
21
22
文档注释使用 ```///```,一般用于函数或结构体(字段)的说明,置于要说明的对象上方。文档注释内部可使用markdown格式的标记语法,可用于 rustdoc 工具的自动文档提取。
23
24
-```
25
-/// Adds one to the number given.
26
-///
27
-/// # Examples
28
29
-/// ```
30
-/// let five = 5;
31
32
-/// assert_eq!(6, add_one(5));
33
-/// # fn add_one(x: i32) -> i32 {
34
-/// # x + 1
35
-/// # }
36
37
-fn add_one(x: i32) -> i32 {
38
- x + 1
39
-}
40
-
41
+ /// Adds one to the number given.
+ ///
+ /// # Examples
+ /// ```
+ /// let five = 5;
+ /// assert_eq!(6, add_one(5));
+ /// # fn add_one(x: i32) -> i32 {
+ /// # x + 1
+ /// # }
+ fn add_one(x: i32) -> i32 {
+ x + 1
+ }
42
43
44
## 模块注释
0 commit comments