Skip to content

Commit 89f75a6

Browse files
committed
Stabilize integer modules
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.
1 parent 1c2df5c commit 89f75a6

File tree

6 files changed

+8
-12
lines changed

6 files changed

+8
-12
lines changed

src/libcore/num/int.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010

1111
//! Operations and constants for architecture-sized signed integers (`int` type)
1212
13-
#![unstable]
13+
#![stable]
1414
#![doc(primitive = "int")]
1515

1616
#[cfg(target_word_size = "32")] int_module! { int, 32 }
1717
#[cfg(target_word_size = "64")] int_module! { int, 64 }
18-

src/libcore/num/int_macros.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ pub const BYTES : uint = ($bits / 8);
2424

2525
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
2626
// calling the `Bounded::min_value` function.
27-
#[unstable]
27+
#[stable]
2828
pub const MIN: $T = (-1 as $T) << (BITS - 1);
2929
// FIXME(#9837): Compute MIN like this so the high bits that shouldn't exist are 0.
3030
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
3131
// calling the `Bounded::max_value` function.
32-
#[unstable]
32+
#[stable]
3333
pub const MAX: $T = !MIN;
3434

3535
) }
36-

src/libcore/num/uint.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
//! Operations and constants for architecture-sized unsigned integers (`uint` type)
1212
13-
#![unstable]
13+
#![stable]
1414
#![doc(primitive = "uint")]
1515

1616
uint_module! { uint, int, ::int::BITS }
17-

src/libcore/num/uint_macros.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ pub const BITS : uint = $bits;
1818
#[unstable]
1919
pub const BYTES : uint = ($bits / 8);
2020

21-
#[unstable]
21+
#[stable]
2222
pub const MIN: $T = 0 as $T;
23-
#[unstable]
23+
#[stable]
2424
pub const MAX: $T = 0 as $T - 1 as $T;
2525

2626
) }
27-

src/libstd/num/int.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Operations and constants for architecture-sized signed integers (`int` type)
1212
13-
#![unstable]
13+
#![stable]
1414
#![doc(primitive = "int")]
1515

1616
pub use core::int::{BITS, BYTES, MIN, MAX};

src/libstd/num/uint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Operations and constants for architecture-sized unsigned integers (`uint` type)
1212
13-
#![unstable]
13+
#![stable]
1414
#![doc(primitive = "uint")]
1515

1616
pub use core::uint::{BITS, BYTES, MIN, MAX};

0 commit comments

Comments
 (0)