diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-12-21 00:04:21 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-21 09:27:35 -0800 |
| commit | f6a7388210e40741e9e5d50ef376ceba3cb34e61 (patch) | |
| tree | 08c377d949e17c0fe0e0c1b23dd35a476eadde2e /src/libcore | |
| parent | e1d09766add86bcc32ebe02151273ccc4f699d10 (diff) | |
| parent | 89f75a6e810e8994143f44e2239f58ffa132ad86 (diff) | |
rollup merge of #20062: aturon/stab-2-ints
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. r? @alexcrichton
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/num/int.rs | 3 | ||||
| -rw-r--r-- | src/libcore/num/int_macros.rs | 5 | ||||
| -rw-r--r-- | src/libcore/num/uint.rs | 3 | ||||
| -rw-r--r-- | src/libcore/num/uint_macros.rs | 5 |
4 files changed, 6 insertions, 10 deletions
diff --git a/src/libcore/num/int.rs b/src/libcore/num/int.rs index a0659d38307..91c5e4163f9 100644 --- a/src/libcore/num/int.rs +++ b/src/libcore/num/int.rs @@ -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 } - diff --git a/src/libcore/num/int_macros.rs b/src/libcore/num/int_macros.rs index 00b9d88abe1..522eab9180c 100644 --- a/src/libcore/num/int_macros.rs +++ b/src/libcore/num/int_macros.rs @@ -24,13 +24,12 @@ pub const BYTES : uint = ($bits / 8); // 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; ) } - diff --git a/src/libcore/num/uint.rs b/src/libcore/num/uint.rs index 80d7b0b4ef3..35739f68da9 100644 --- a/src/libcore/num/uint.rs +++ b/src/libcore/num/uint.rs @@ -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 } - diff --git a/src/libcore/num/uint_macros.rs b/src/libcore/num/uint_macros.rs index d79cf20fdfa..82eca0d4659 100644 --- a/src/libcore/num/uint_macros.rs +++ b/src/libcore/num/uint_macros.rs @@ -18,10 +18,9 @@ pub const BITS : uint = $bits; #[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; ) } - |
