about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-07 17:18:01 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-07 17:18:01 -0800
commitdd38f46d71872fba50833fd22313ef49eb01d079 (patch)
treef4306baac76c8869273d49e0dd8da0251df4bc2d /src/libstd
parentb21a0cee19ab1cdbe57c7f277a9cc9f2658ebce2 (diff)
parent321d9ddff21b532300a9ced6ae7ce5f902c0fbf5 (diff)
downloadrust-dd38f46d71872fba50833fd22313ef49eb01d079.tar.gz
rust-dd38f46d71872fba50833fd22313ef49eb01d079.zip
rollup merge of #20708: aturon/new-int-modules
Conflicts:
	src/libserialize/lib.rs
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io/mod.rs3
-rw-r--r--src/libstd/io/process.rs7
-rw-r--r--src/libstd/lib.rs6
-rw-r--r--src/libstd/num/int.rs9
-rw-r--r--src/libstd/num/isize.rs22
-rw-r--r--src/libstd/num/uint.rs9
-rw-r--r--src/libstd/num/usize.rs22
-rw-r--r--src/libstd/path/mod.rs1
8 files changed, 59 insertions, 20 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs
index 9ef9081bc3c..2595a3c44a8 100644
--- a/src/libstd/io/mod.rs
+++ b/src/libstd/io/mod.rs
@@ -1783,9 +1783,8 @@ pub struct UnstableFileStat {
 }
 
 
-// NOTE(stage0): change this one last #[doc=..] to /// after the next snapshot
 bitflags! {
-    #[doc = "A set of permissions for a file or directory is represented by a set of"]
+    /// A set of permissions for a file or directory is represented by a set of
     /// flags which are or'd together.
     flags FilePermission: u32 {
         const USER_READ     = 0o400,
diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs
index ed29d3b2c7f..f824d821601 100644
--- a/src/libstd/io/process.rs
+++ b/src/libstd/io/process.rs
@@ -395,13 +395,6 @@ impl Command {
     }
 }
 
-#[cfg(stage0)]
-impl fmt::Show for Command {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::String::fmt(self, f)
-    }
-}
-
 impl fmt::String for Command {
     /// Format the program and arguments of a Command for display. Any
     /// non-utf8 data is lossily converted using the utf8 replacement
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 15f279f1b45..c2daa08d4d3 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -109,7 +109,6 @@
 #![feature(lang_items, unsafe_destructor)]
 #![feature(slicing_syntax, unboxed_closures)]
 #![feature(old_impl_check)]
-#![cfg_attr(stage0, allow(unused_attributes))]
 
 // Don't link to std. We are std.
 #![no_std]
@@ -154,7 +153,6 @@ pub use core::finally;
 pub use core::hash;
 pub use core::intrinsics;
 pub use core::iter;
-#[cfg(stage0)] #[cfg(not(test))] pub use core::marker as kinds;
 #[cfg(not(test))] pub use core::marker;
 pub use core::mem;
 #[cfg(not(test))] pub use core::ops;
@@ -205,12 +203,14 @@ mod int_macros;
 mod uint_macros;
 
 #[path = "num/int.rs"]  pub mod int;
+#[path = "num/isize.rs"]  pub mod isize;
 #[path = "num/i8.rs"]   pub mod i8;
 #[path = "num/i16.rs"]  pub mod i16;
 #[path = "num/i32.rs"]  pub mod i32;
 #[path = "num/i64.rs"]  pub mod i64;
 
 #[path = "num/uint.rs"] pub mod uint;
+#[path = "num/usize.rs"] pub mod usize;
 #[path = "num/u8.rs"]   pub mod u8;
 #[path = "num/u16.rs"]  pub mod u16;
 #[path = "num/u32.rs"]  pub mod u32;
@@ -286,8 +286,6 @@ mod std {
     pub use vec; // used for vec![]
     pub use cell; // used for tls!
     pub use thread_local; // used for thread_local!
-    #[cfg(stage0)]
-    pub use marker as kinds;
     pub use marker;  // used for tls!
     pub use ops; // used for bitflags!
 
diff --git a/src/libstd/num/int.rs b/src/libstd/num/int.rs
index 9ccb1544fdc..69439f85115 100644
--- a/src/libstd/num/int.rs
+++ b/src/libstd/num/int.rs
@@ -8,10 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-//! Operations and constants for architecture-sized signed integers (`int` type)
+//! Deprecated: replaced by `isize`.
+//!
+//! The rollout of the new type will gradually take place over the
+//! alpha cycle along with the development of clearer conventions
+//! around integer types.
 
-#![stable]
-#![doc(primitive = "int")]
+#![deprecated = "replaced by isize"]
 
 pub use core::int::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/isize.rs b/src/libstd/num/isize.rs
new file mode 100644
index 00000000000..22395a1c0ff
--- /dev/null
+++ b/src/libstd/num/isize.rs
@@ -0,0 +1,22 @@
+// Copyright 2012-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.
+
+//! Operations and constants for pointer-sized signed integers (`isize` type)
+//!
+//! This type was recently added to replace `int`. The rollout of the
+//! new type will gradually take place over the alpha cycle along with
+//! the development of clearer conventions around integer types.
+
+#![stable]
+#![doc(primitive = "isize")]
+
+pub use core::isize::{BITS, BYTES, MIN, MAX};
+
+int_module! { isize }
diff --git a/src/libstd/num/uint.rs b/src/libstd/num/uint.rs
index 0fbc0953b20..0e12eff205f 100644
--- a/src/libstd/num/uint.rs
+++ b/src/libstd/num/uint.rs
@@ -8,10 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-//! Operations and constants for architecture-sized unsigned integers (`uint` type)
+//! Deprecated: replaced by `usize`.
+//!
+//! The rollout of the new type will gradually take place over the
+//! alpha cycle along with the development of clearer conventions
+//! around integer types.
 
-#![stable]
-#![doc(primitive = "uint")]
+#![deprecated = "replaced by usize"]
 
 pub use core::uint::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/usize.rs b/src/libstd/num/usize.rs
new file mode 100644
index 00000000000..74dd38e13c5
--- /dev/null
+++ b/src/libstd/num/usize.rs
@@ -0,0 +1,22 @@
+// Copyright 2012-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.
+
+//! Operations and constants for pointer-sized unsigned integers (`usize` type)
+//!
+//! This type was recently added to replace `uint`. The rollout of the
+//! new type will gradually take place over the alpha cycle along with
+//! the development of clearer conventions around integer types.
+
+#![stable]
+#![doc(primitive = "usize")]
+
+pub use core::usize::{BITS, BYTES, MIN, MAX};
+
+uint_module! { usize }
diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs
index 581969e98fb..aa59d60d7a4 100644
--- a/src/libstd/path/mod.rs
+++ b/src/libstd/path/mod.rs
@@ -823,7 +823,6 @@ pub struct Display<'a, P:'a> {
     filename: bool
 }
 
-//NOTE(stage0): replace with deriving(Show) after snapshot
 impl<'a, P: GenericPath> fmt::Show for Display<'a, P> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         fmt::String::fmt(self, f)