rustdoc: Use doc comments for rustdoc's rustdocs

This commit is contained in:
Brian Anderson 2012-09-20 16:09:46 -07:00
parent d3f0ede198
commit 89bbbd612a
8 changed files with 47 additions and 46 deletions

View File

@ -1,11 +1,11 @@
#[doc(
brief = "Provides all access to AST-related, non-sendable info",
desc =
"Rustdoc is intended to be parallel, and the rustc AST is filled \
with shared boxes. The AST service attempts to provide a single \
place to query AST-related information, shielding the rest of \
Rustdoc from its non-sendableness."
)];
/*!
Provides all access to AST-related, non-sendable info
Rustdoc is intended to be parallel, and the rustc AST is filled with
shared boxes. The AST service attempts to provide a single place to
query AST-related information, shielding the rest of Rustdoc from its
non-sendableness.
*/
use std::map::HashMap;
use rustc::driver::session;

View File

@ -1,9 +1,9 @@
#[doc(
brief = "Attribute parsing",
desc =
"The attribute parser provides methods for pulling documentation out of \
an AST's attributes."
)];
/*!
Attribute parsing
The attribute parser provides methods for pulling documentation out of
an AST's attributes.
*/
use syntax::ast;
use syntax::attr;

View File

@ -1,10 +1,10 @@
#[doc(
brief = "The attribute parsing pass",
desc =
"Traverses the document tree, pulling relevant documention out of the \
corresponding AST nodes. The information gathered here is the basis \
of the natural-language documentation for a crate."
)];
/*!
The attribute parsing pass
Traverses the document tree, pulling relevant documention out of the
corresponding AST nodes. The information gathered here is the basis
of the natural-language documentation for a crate.
*/
use doc::ItemUtils;
use extract::to_str;

View File

@ -1,9 +1,9 @@
/*!
* Pulls a brief description out of a long description.
*
* If the first paragraph of a long description is short enough then it
* is interpreted as the brief description.
*/
Pulls a brief description out of a long description.
If the first paragraph of a long description is short enough then it
is interpreted as the brief description.
*/
use doc::ItemUtils;

View File

@ -1,9 +1,9 @@
/*!
* Divides the document tree into pages.
*
* Each page corresponds is a logical section. There may be pages for
* individual modules, pages for the crate, indexes, etc.
*/
Divides the document tree into pages.
Each page corresponds is a logical section. There may be pages for
individual modules, pages for the crate, indexes, etc.
*/
use doc::{ItemUtils, PageUtils};
use syntax::ast;

View File

@ -1,4 +1,5 @@
// Some utility interfaces
//! Some utility interfaces
use doc::ItemUtils;
use doc::Item;
use doc::util;

View File

@ -1,9 +1,9 @@
/*!
* Pulls a brief description out of a long description.
*
* If the first paragraph of a long description is short enough then it
* is interpreted as the brief description.
*/
Pulls a brief description out of a long description.
If the first paragraph of a long description is short enough then it
is interpreted as the brief description.
*/
use doc::ItemUtils;

View File

@ -1,13 +1,13 @@
/*!
* Removes the common level of indention from description strings. For
* instance, if an entire doc comment is indented 8 spaces we want to
* remove those 8 spaces from every line.
*
* The first line of a string is allowed to be intend less than
* subsequent lines in the same paragraph in order to account for
* instances where the string containing the doc comment is opened in the
* middle of a line, and each of the following lines is indented.
*/
Removes the common level of indention from description strings. For
instance, if an entire doc comment is indented 8 spaces we want to
remove those 8 spaces from every line.
The first line of a string is allowed to be intend less than
subsequent lines in the same paragraph in order to account for
instances where the string containing the doc comment is opened in the
middle of a line, and each of the following lines is indented.
*/
export mk_pass;