about summary refs log tree commit diff
path: root/src/libstd/array.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-07-21 13:06:45 +0000
committerbors <bors@rust-lang.org>2015-07-21 13:06:45 +0000
commitfec23d9d59cd4fda9a5642d63ad27f8dcc6c3bd8 (patch)
treeb3e9f9b838dd968c1408b7fb0ae9a9620670c0f5 /src/libstd/array.rs
parent2afe47d1688726fd1e836deedaa0ad8c2ec891c7 (diff)
parent778c89c1bb86dbd370e8b51911e2916180f42aec (diff)
downloadrust-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/array.rs')
-rw-r--r--src/libstd/array.rs55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/libstd/array.rs b/src/libstd/array.rs
deleted file mode 100644
index 0dfcc72e379..00000000000
--- a/src/libstd/array.rs
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! A fixed-size array is denoted `[T; N]` for the element type `T` and
-//! the compile time constant size `N`. The size must be zero or positive.
-//!
-//! Arrays values are created either with an explicit expression that lists
-//! each element: `[x, y, z]` or a repeat expression: `[x; N]`. The repeat
-//! expression requires that the element type is `Copy`.
-//!
-//! The type `[T; N]` is `Copy` if `T: Copy`.
-//!
-//! Arrays of sizes from 0 to 32 (inclusive) implement the following traits
-//! if the element type allows it:
-//!
-//! - `Clone`
-//! - `Debug`
-//! - `IntoIterator` (implemented for `&[T; N]` and `&mut [T; N]`)
-//! - `PartialEq`, `PartialOrd`, `Ord`, `Eq`
-//! - `Hash`
-//! - `AsRef`, `AsMut`
-//!
-//! Arrays dereference to [slices (`[T]`)][slice], so their methods can be called
-//! on arrays.
-//!
-//! [slice]: primitive.slice.html
-//!
-//! Rust does not currently support generics over the size of an array type.
-//!
-//! # Examples
-//!
-//! ```
-//! let mut array: [i32; 3] = [0; 3];
-//!
-//! array[1] = 1;
-//! array[2] = 2;
-//!
-//! assert_eq!([1, 2], &array[1..]);
-//!
-//! // This loop prints: 0 1 2
-//! for x in &array {
-//!     print!("{} ", x);
-//! }
-//!
-//! ```
-//!
-
-#![doc(primitive = "array")]