]> git.lizzy.rs Git - rust.git/commitdiff
Stabilize integer modules
authorAaron Turon <aturon@mozilla.com>
Sat, 20 Dec 2014 06:28:12 +0000 (22:28 -0800)
committerAaron Turon <aturon@mozilla.com>
Sat, 20 Dec 2014 06:28:12 +0000 (22:28 -0800)
This small patch stabilizes the names of all integer modules (including
`int` and `uint`) and the `MIN` and `MAX` constants. The `BITS` and
`BYTES` constants are left unstable for now.

src/libcore/num/int.rs
src/libcore/num/int_macros.rs
src/libcore/num/uint.rs
src/libcore/num/uint_macros.rs
src/libstd/num/int.rs
src/libstd/num/uint.rs

index a0659d383076486fd2986cdc54b0c432efd8c266..91c5e4163f9e598ded24217da81749c648309a81 100644 (file)
@@ -10,9 +10,8 @@
 
 //! Operations and constants for architecture-sized signed integers (`int` type)
 
-#![unstable]
+#![stable]
 #![doc(primitive = "int")]
 
 #[cfg(target_word_size = "32")] int_module! { int, 32 }
 #[cfg(target_word_size = "64")] int_module! { int, 64 }
-
index 00b9d88abe194d0746a730e9b1e4738a0843c578..522eab9180c86bce7bc2c85d575ccb143c922630 100644 (file)
@@ -24,13 +24,12 @@ macro_rules! int_module { ($T:ty, $bits:expr) => (
 
 // FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
 // calling the `Bounded::min_value` function.
-#[unstable]
+#[stable]
 pub const MIN: $T = (-1 as $T) << (BITS - 1);
 // FIXME(#9837): Compute MIN like this so the high bits that shouldn't exist are 0.
 // FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
 // calling the `Bounded::max_value` function.
-#[unstable]
+#[stable]
 pub const MAX: $T = !MIN;
 
 ) }
-
index 80d7b0b4ef374697696d148a9c945e1b3593cd50..35739f68da9697af17efd96a5321b23afc112a56 100644 (file)
@@ -10,8 +10,7 @@
 
 //! Operations and constants for architecture-sized unsigned integers (`uint` type)
 
-#![unstable]
+#![stable]
 #![doc(primitive = "uint")]
 
 uint_module! { uint, int, ::int::BITS }
-
index d79cf20fdfa6fe9967e6aab2118175d2485f83f9..82eca0d46598204a08f0aa63ce0f447207f76f10 100644 (file)
@@ -18,10 +18,9 @@ macro_rules! uint_module { ($T:ty, $T_SIGNED:ty, $bits:expr) => (
 #[unstable]
 pub const BYTES : uint = ($bits / 8);
 
-#[unstable]
+#[stable]
 pub const MIN: $T = 0 as $T;
-#[unstable]
+#[stable]
 pub const MAX: $T = 0 as $T - 1 as $T;
 
 ) }
-
index f59dab4b20bde4c35419f59d43f258e1720a8e72..9ccb1544fdc6614d2c0a8f0a95ac6104baf7d45c 100644 (file)
@@ -10,7 +10,7 @@
 
 //! Operations and constants for architecture-sized signed integers (`int` type)
 
-#![unstable]
+#![stable]
 #![doc(primitive = "int")]
 
 pub use core::int::{BITS, BYTES, MIN, MAX};
index 7f8edee571fb8eafce0ef057c8a72320b6081759..cd000b3098bff4f6a7953a7d282299105144efc5 100644 (file)
@@ -10,7 +10,7 @@
 
 //! Operations and constants for architecture-sized unsigned integers (`uint` type)
 
-#![unstable]
+#![stable]
 #![doc(primitive = "uint")]
 
 pub use core::uint::{BITS, BYTES, MIN, MAX};