Skip to content

Commit 89bbbd6

Browse files
committed
rustdoc: Use doc comments for rustdoc's rustdocs
1 parent d3f0ede commit 89bbbd6

File tree

8 files changed

+47
-46
lines changed

8 files changed

+47
-46
lines changed

src/rustdoc/astsrv.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#[doc(
2-
brief = "Provides all access to AST-related, non-sendable info",
3-
desc =
4-
"Rustdoc is intended to be parallel, and the rustc AST is filled \
5-
with shared boxes. The AST service attempts to provide a single \
6-
place to query AST-related information, shielding the rest of \
7-
Rustdoc from its non-sendableness."
8-
)];
1+
/*!
2+
Provides all access to AST-related, non-sendable info
3+
4+
Rustdoc is intended to be parallel, and the rustc AST is filled with
5+
shared boxes. The AST service attempts to provide a single place to
6+
query AST-related information, shielding the rest of Rustdoc from its
7+
non-sendableness.
8+
*/
99

1010
use std::map::HashMap;
1111
use rustc::driver::session;

src/rustdoc/attr_parser.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#[doc(
2-
brief = "Attribute parsing",
3-
desc =
4-
"The attribute parser provides methods for pulling documentation out of \
5-
an AST's attributes."
6-
)];
1+
/*!
2+
Attribute parsing
3+
4+
The attribute parser provides methods for pulling documentation out of
5+
an AST's attributes.
6+
*/
77

88
use syntax::ast;
99
use syntax::attr;

src/rustdoc/attr_pass.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#[doc(
2-
brief = "The attribute parsing pass",
3-
desc =
4-
"Traverses the document tree, pulling relevant documention out of the \
5-
corresponding AST nodes. The information gathered here is the basis \
6-
of the natural-language documentation for a crate."
7-
)];
1+
/*!
2+
The attribute parsing pass
3+
4+
Traverses the document tree, pulling relevant documention out of the
5+
corresponding AST nodes. The information gathered here is the basis
6+
of the natural-language documentation for a crate.
7+
*/
88

99
use doc::ItemUtils;
1010
use extract::to_str;

src/rustdoc/desc_to_brief_pass.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* Pulls a brief description out of a long description.
3-
*
4-
* If the first paragraph of a long description is short enough then it
5-
* is interpreted as the brief description.
6-
*/
2+
Pulls a brief description out of a long description.
3+
4+
If the first paragraph of a long description is short enough then it
5+
is interpreted as the brief description.
6+
*/
77

88
use doc::ItemUtils;
99

src/rustdoc/page_pass.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* Divides the document tree into pages.
3-
*
4-
* Each page corresponds is a logical section. There may be pages for
5-
* individual modules, pages for the crate, indexes, etc.
6-
*/
2+
Divides the document tree into pages.
3+
4+
Each page corresponds is a logical section. There may be pages for
5+
individual modules, pages for the crate, indexes, etc.
6+
*/
77

88
use doc::{ItemUtils, PageUtils};
99
use syntax::ast;

src/rustdoc/rustdoc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// Some utility interfaces
1+
//! Some utility interfaces
2+
23
use doc::ItemUtils;
34
use doc::Item;
45
use doc::util;

src/rustdoc/trim_pass.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* Pulls a brief description out of a long description.
3-
*
4-
* If the first paragraph of a long description is short enough then it
5-
* is interpreted as the brief description.
6-
*/
2+
Pulls a brief description out of a long description.
3+
4+
If the first paragraph of a long description is short enough then it
5+
is interpreted as the brief description.
6+
*/
77

88
use doc::ItemUtils;
99

src/rustdoc/unindent_pass.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*!
2-
* Removes the common level of indention from description strings. For
3-
* instance, if an entire doc comment is indented 8 spaces we want to
4-
* remove those 8 spaces from every line.
5-
*
6-
* The first line of a string is allowed to be intend less than
7-
* subsequent lines in the same paragraph in order to account for
8-
* instances where the string containing the doc comment is opened in the
9-
* middle of a line, and each of the following lines is indented.
10-
*/
2+
Removes the common level of indention from description strings. For
3+
instance, if an entire doc comment is indented 8 spaces we want to
4+
remove those 8 spaces from every line.
5+
6+
The first line of a string is allowed to be intend less than
7+
subsequent lines in the same paragraph in order to account for
8+
instances where the string containing the doc comment is opened in the
9+
middle of a line, and each of the following lines is indented.
10+
*/
1111

1212
export mk_pass;
1313

0 commit comments

Comments
 (0)