@@ -23,9 +23,14 @@ Instead of:
23
23
Doc comments are prefixed by three slashes (` /// ` ) and indicate
24
24
documentation that you would like to be included in Rustdoc's output.
25
25
They support
26
- [ Markdown syntax] ( http ://daringfireball.net/projects/markdown/ )
26
+ [ Markdown syntax] ( https ://en.wikipedia.org/wiki/Markdown )
27
27
and are the main way of documenting your public APIs.
28
28
29
+ The supported markdown syntax includes all of the extensions listed in the
30
+ [ GitHub Flavored Markdown]
31
+ (https://help.github.com/articles/github-flavored-markdown ) documentation,
32
+ plus superscripts.
33
+
29
34
### Summary line
30
35
31
36
The first line in any doc comment should be a single-line short sentence
@@ -39,18 +44,23 @@ All doc comments, including the summary line, should begin with a
39
44
capital letter and end with a period, question mark, or exclamation
40
45
point. Prefer full sentences to fragments.
41
46
47
+ The summary line should be written in
48
+ [ third person singular present indicative form]
49
+ (http://en.wikipedia.org/wiki/English_verbs#Third_person_singular_present ).
50
+ Basically, this means write "Returns" instead of "Return".
51
+
42
52
For example:
43
53
44
54
``` rust
45
- /// Set up a default runtime configuration, given compiler-supplied arguments.
55
+ /// Sets up a default runtime configuration, given compiler-supplied arguments.
46
56
///
47
- /// This function will block until the entire pool of M:N schedulers have
57
+ /// This function will block until the entire pool of M:N schedulers has
48
58
/// exited. This function also requires a local task to be available.
49
59
///
50
60
/// # Arguments
51
61
///
52
62
/// * `argc` & `argv` - The argument vector. On Unix this information is used
53
- /// by os::args.
63
+ /// by ` os::args` .
54
64
/// * `main` - The initial procedure to run inside of the M:N scheduling pool.
55
65
/// Once this procedure exits, the scheduling pool will begin to shut
56
66
/// down. The entire pool (and this function) will only return once
0 commit comments