about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-21 00:04:08 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-21 09:27:33 -0800
commitfc40812b0f7a07834b2ad557ec3d5a0e98e80f85 (patch)
treeb99f28c97d822711a4cb0220093a9da0bacaa731 /src/libcore
parent4ae3107e72b3ae06f2c1f987d6ccc6087c7097ce (diff)
parent1b42e890bf99d37a9e6447912c75c5b5e4695c4e (diff)
rollup merge of #20006: alexcrichton/no-more-empty-modules
This commit modifies rustdoc to not require these empty modules to be public in
the standard library. The modules still remain as a location to attach
documentation to, but the modules themselves are now private (don't have to
commit to an API). The documentation for the standard library now shows all of
the primitive types on the main index page.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/bool.rs16
-rw-r--r--src/libcore/lib.rs7
-rw-r--r--src/libcore/tuple.rs (renamed from src/libcore/tuple/mod.rs)2
-rw-r--r--src/libcore/tuple/unit.rs46
4 files changed, 1 insertions, 70 deletions
diff --git a/src/libcore/bool.rs b/src/libcore/bool.rs
deleted file mode 100644
index 9d2ea816fdf..00000000000
--- a/src/libcore/bool.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 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.
-
-//! The boolean type
-
-#![doc(primitive = "bool")]
-#![unstable = "this module is purely for documentation and it will likely be \
-               removed from the public api"]
-
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 729cb69193e..9b6622a7127 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -107,7 +107,6 @@ pub mod default;
 
 pub mod any;
 pub mod atomic;
-pub mod bool;
 pub mod borrow;
 pub mod cell;
 pub mod char;
@@ -120,15 +119,11 @@ pub mod result;
 pub mod simd;
 pub mod slice;
 pub mod str;
-pub mod tuple;
 pub mod hash;
-// FIXME #15320: primitive documentation needs top-level modules, this
-// should be `core::tuple::unit`.
-#[path = "tuple/unit.rs"]
-pub mod unit;
 pub mod fmt;
 
 // note: does not need to be public
+mod tuple;
 mod array;
 
 #[doc(hidden)]
diff --git a/src/libcore/tuple/mod.rs b/src/libcore/tuple.rs
index 5ea84f7db91..4984c8de3bf 100644
--- a/src/libcore/tuple/mod.rs
+++ b/src/libcore/tuple.rs
@@ -62,12 +62,10 @@
 //! assert_eq!(d, (0u32, 0.0f32));
 //! ```
 
-#![doc(primitive = "tuple")]
 #![stable]
 
 #[unstable = "this is just a documentation module and should not be part \
               of the public api"]
-pub use unit;
 
 use clone::Clone;
 use cmp::*;
diff --git a/src/libcore/tuple/unit.rs b/src/libcore/tuple/unit.rs
deleted file mode 100644
index 7f89f0e5ae3..00000000000
--- a/src/libcore/tuple/unit.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2014 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.
-
-#![doc(primitive = "unit")]
-#![unstable = "this module is purely for documentation and it will likely be \
-               removed from the public api"]
-
-//! The `()` type, sometimes called "unit" or "nil".
-//!
-//! The `()` type has exactly one value `()`, and is used when there
-//! is no other meaningful value that could be returned. `()` is most
-//! commonly seen implicitly: functions without a `-> ...` implicitly
-//! have return type `()`, that is, these are equivalent:
-//!
-//! ```rust
-//! fn long() -> () {}
-//!
-//! fn short() {}
-//! ```
-//!
-//! The semicolon `;` can be used to discard the result of an
-//! expression at the end of a block, making the expression (and thus
-//! the block) evaluate to `()`. For example,
-//!
-//! ```rust
-//! fn returns_i64() -> i64 {
-//!     1i64
-//! }
-//! fn returns_unit() {
-//!     1i64;
-//! }
-//!
-//! let is_i64 = {
-//!     returns_i64()
-//! };
-//! let is_unit = {
-//!     returns_i64();
-//! };
-//! ```