diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-07 17:18:01 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-07 17:18:01 -0800 |
| commit | dd38f46d71872fba50833fd22313ef49eb01d079 (patch) | |
| tree | f4306baac76c8869273d49e0dd8da0251df4bc2d /src/libstd/num | |
| parent | b21a0cee19ab1cdbe57c7f277a9cc9f2658ebce2 (diff) | |
| parent | 321d9ddff21b532300a9ced6ae7ce5f902c0fbf5 (diff) | |
| download | rust-dd38f46d71872fba50833fd22313ef49eb01d079.tar.gz rust-dd38f46d71872fba50833fd22313ef49eb01d079.zip | |
rollup merge of #20708: aturon/new-int-modules
Conflicts: src/libserialize/lib.rs
Diffstat (limited to 'src/libstd/num')
| -rw-r--r-- | src/libstd/num/int.rs | 9 | ||||
| -rw-r--r-- | src/libstd/num/isize.rs | 22 | ||||
| -rw-r--r-- | src/libstd/num/uint.rs | 9 | ||||
| -rw-r--r-- | src/libstd/num/usize.rs | 22 |
4 files changed, 56 insertions, 6 deletions
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 } |
