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", Provides all access to AST-related, non-sendable info
desc =
"Rustdoc is intended to be parallel, and the rustc AST is filled \ Rustdoc is intended to be parallel, and the rustc AST is filled with
with shared boxes. The AST service attempts to provide a single \ shared boxes. The AST service attempts to provide a single place to
place to query AST-related information, shielding the rest of \ query AST-related information, shielding the rest of Rustdoc from its
Rustdoc from its non-sendableness." non-sendableness.
)]; */
use std::map::HashMap; use std::map::HashMap;
use rustc::driver::session; use rustc::driver::session;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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