diff options
| author | bors <bors@rust-lang.org> | 2015-07-21 13:06:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-07-21 13:06:45 +0000 |
| commit | fec23d9d59cd4fda9a5642d63ad27f8dcc6c3bd8 (patch) | |
| tree | b3e9f9b838dd968c1408b7fb0ae9a9620670c0f5 /src/libstd/lib.rs | |
| parent | 2afe47d1688726fd1e836deedaa0ad8c2ec891c7 (diff) | |
| parent | 778c89c1bb86dbd370e8b51911e2916180f42aec (diff) | |
| download | rust-fec23d9d59cd4fda9a5642d63ad27f8dcc6c3bd8.tar.gz rust-fec23d9d59cd4fda9a5642d63ad27f8dcc6c3bd8.zip | |
Auto merge of #27168 - brson:stdprim, r=steveklabnik
This makes the primitive descriptions on the front page read properly
as descriptions of types and not of the associated modules.
Having the primitive and module docs derived from the same source
causes problems, primarily that they can't contain hyperlinks
cross-referencing each other.
This crates dedicated private modules in `std` to document the
primitive types, then for all primitives that have a corresponding
module, puts hyperlinks in moth the primitive docs and the module docs
cross-linking each other.
This should help clear up confusion when readers find themselves on
the wrong page.
This also removes all the duplicate `#[doc(primitive)]` tags in various places (especially core), so the core docs will no longer attempt to document the primitives for now. Seems like an acceptable tradeoff to get some cleanup for std.
Diffstat (limited to 'src/libstd/lib.rs')
| -rw-r--r-- | src/libstd/lib.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index fa90670acfb..82bc1314ad5 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -415,12 +415,10 @@ pub mod __rand { pub use rand::{thread_rng, ThreadRng, Rng}; } -// Modules that exist purely to document + host impl docs for primitive types - -mod array; -mod bool; -mod unit; -mod tuple; +// Include a number of private modules that exist solely to provide +// the rustdoc documentation for primitive types. Using `include!` +// because rustdoc only looks for these modules at the crate level. +include!("primitive_docs.rs"); // A curious inner-module that's not exported that contains the binding // 'std' so that macro-expanded references to std::error and such |
