diff options
| author | Brian Anderson <banderson@mozilla.com> | 2015-07-20 11:21:02 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2015-07-20 13:18:06 -0700 |
| commit | 8497c428e5da665917304ae404b9b3e7b0a94466 (patch) | |
| tree | b3d872537c5d91ecb13a725de3940e82ff5f0648 /src/libstd/num | |
| parent | 44dd247cd5ced8ae8a8c6f1d04463abce21c8e9e (diff) | |
| download | rust-8497c428e5da665917304ae404b9b3e7b0a94466.tar.gz rust-8497c428e5da665917304ae404b9b3e7b0a94466.zip | |
std: Create separate docs for the primitives
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.
Diffstat (limited to 'src/libstd/num')
| -rw-r--r-- | src/libstd/num/f32.rs | 4 | ||||
| -rw-r--r-- | src/libstd/num/f64.rs | 3 | ||||
| -rw-r--r-- | src/libstd/num/i16.rs | 3 | ||||
| -rw-r--r-- | src/libstd/num/i32.rs | 3 | ||||
| -rw-r--r-- | src/libstd/num/i64.rs | 3 | ||||
| -rw-r--r-- | src/libstd/num/i8.rs | 3 | ||||
| -rw-r--r-- | src/libstd/num/isize.rs | 3 | ||||
| -rw-r--r-- | src/libstd/num/u16.rs | 3 | ||||
| -rw-r--r-- | src/libstd/num/u32.rs | 3 | ||||
| -rw-r--r-- | src/libstd/num/u64.rs | 3 | ||||
| -rw-r--r-- | src/libstd/num/u8.rs | 3 | ||||
| -rw-r--r-- | src/libstd/num/usize.rs | 3 |
12 files changed, 25 insertions, 12 deletions
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 561b84ca21a..259106ac0b4 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -9,10 +9,12 @@ // except according to those terms. //! The 32-bit floating point type +//! +//! *[See also the `f32` primitive type](../primitive.f32.html).* #![stable(feature = "rust1", since = "1.0.0")] #![allow(missing_docs)] -#![doc(primitive = "f32")] +#![allow(unsigned_negation)] use prelude::v1::*; diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index 8a77566faeb..3cb1ee06e5c 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -9,10 +9,11 @@ // except according to those terms. //! The 32-bit floating point type +//! +//! *[See also the `f64` primitive type](../primitive.f64.html).* #![stable(feature = "rust1", since = "1.0.0")] #![allow(missing_docs)] -#![doc(primitive = "f64")] use prelude::v1::*; diff --git a/src/libstd/num/i16.rs b/src/libstd/num/i16.rs index 04a45072d1a..e8ad74cce4e 100644 --- a/src/libstd/num/i16.rs +++ b/src/libstd/num/i16.rs @@ -9,9 +9,10 @@ // except according to those terms. //! The 16-bit signed integer type +//! +//! *[See also the `i16` primitive type](../primitive.i16.html).* #![stable(feature = "rust1", since = "1.0.0")] -#![doc(primitive = "i16")] pub use core::i16::{BITS, BYTES, MIN, MAX}; diff --git a/src/libstd/num/i32.rs b/src/libstd/num/i32.rs index 09177c188de..d30f76b5580 100644 --- a/src/libstd/num/i32.rs +++ b/src/libstd/num/i32.rs @@ -9,9 +9,10 @@ // except according to those terms. //! The 32-bit signed integer type +//! +//! *[See also the `i32` primitive type](../primitive.i32.html).* #![stable(feature = "rust1", since = "1.0.0")] -#![doc(primitive = "i32")] pub use core::i32::{BITS, BYTES, MIN, MAX}; diff --git a/src/libstd/num/i64.rs b/src/libstd/num/i64.rs index 84fccc9d25f..9c3cf23800c 100644 --- a/src/libstd/num/i64.rs +++ b/src/libstd/num/i64.rs @@ -9,9 +9,10 @@ // except according to those terms. //! The 64-bit signed integer type +//! +//! *[See also the `i64` primitive type](../primitive.i64.html).* #![stable(feature = "rust1", since = "1.0.0")] -#![doc(primitive = "i64")] pub use core::i64::{BITS, BYTES, MIN, MAX}; diff --git a/src/libstd/num/i8.rs b/src/libstd/num/i8.rs index f0e84883847..fdd45a1e117 100644 --- a/src/libstd/num/i8.rs +++ b/src/libstd/num/i8.rs @@ -9,9 +9,10 @@ // except according to those terms. //! The 8-bit signed integer type +//! +//! *[See also the `i8` primitive type](../primitive.i8.html).* #![stable(feature = "rust1", since = "1.0.0")] -#![doc(primitive = "i8")] pub use core::i8::{BITS, BYTES, MIN, MAX}; diff --git a/src/libstd/num/isize.rs b/src/libstd/num/isize.rs index b602c7c704a..3da96c7601c 100644 --- a/src/libstd/num/isize.rs +++ b/src/libstd/num/isize.rs @@ -9,9 +9,10 @@ // except according to those terms. //! The pointer-sized signed integer type +//! +//! *[See also the `isize` primitive type](../primitive.isize.html).* #![stable(feature = "rust1", since = "1.0.0")] -#![doc(primitive = "isize")] pub use core::isize::{BITS, BYTES, MIN, MAX}; diff --git a/src/libstd/num/u16.rs b/src/libstd/num/u16.rs index 17f25402200..6acdc65b9ea 100644 --- a/src/libstd/num/u16.rs +++ b/src/libstd/num/u16.rs @@ -9,9 +9,10 @@ // except according to those terms. //! The 16-bit unsigned integer type +//! +//! *[See also the `u16` primitive type](../primitive.u16.html).* #![stable(feature = "rust1", since = "1.0.0")] -#![doc(primitive = "u16")] pub use core::u16::{BITS, BYTES, MIN, MAX}; diff --git a/src/libstd/num/u32.rs b/src/libstd/num/u32.rs index 13be3677dac..78496f98910 100644 --- a/src/libstd/num/u32.rs +++ b/src/libstd/num/u32.rs @@ -9,9 +9,10 @@ // except according to those terms. //! The 32-bit unsigned integer type +//! +//! *[See also the `u32` primitive type](../primitive.u32.html).* #![stable(feature = "rust1", since = "1.0.0")] -#![doc(primitive = "u32")] pub use core::u32::{BITS, BYTES, MIN, MAX}; diff --git a/src/libstd/num/u64.rs b/src/libstd/num/u64.rs index 40b6e138307..0c0d5dc3e9d 100644 --- a/src/libstd/num/u64.rs +++ b/src/libstd/num/u64.rs @@ -9,9 +9,10 @@ // except according to those terms. //! The 64-bit unsigned integer type +//! +//! *[See also the `u64` primitive type](../primitive.u64.html).* #![stable(feature = "rust1", since = "1.0.0")] -#![doc(primitive = "u64")] pub use core::u64::{BITS, BYTES, MIN, MAX}; diff --git a/src/libstd/num/u8.rs b/src/libstd/num/u8.rs index 02fc807e1f2..7ca80d07fd6 100644 --- a/src/libstd/num/u8.rs +++ b/src/libstd/num/u8.rs @@ -9,9 +9,10 @@ // except according to those terms. //! The 8-bit unsigned integer type +//! +//! *[See also the `u8` primitive type](../primitive.u8.html).* #![stable(feature = "rust1", since = "1.0.0")] -#![doc(primitive = "u8")] pub use core::u8::{BITS, BYTES, MIN, MAX}; diff --git a/src/libstd/num/usize.rs b/src/libstd/num/usize.rs index 548c0dbb8dc..15e783bc40e 100644 --- a/src/libstd/num/usize.rs +++ b/src/libstd/num/usize.rs @@ -9,9 +9,10 @@ // except according to those terms. //! The pointer-sized unsigned integer type +//! +//! *[See also the `usize` primitive type](../primitive.usize.html).* #![stable(feature = "rust1", since = "1.0.0")] -#![doc(primitive = "usize")] pub use core::usize::{BITS, BYTES, MIN, MAX}; |
