diff options
| author | bors <bors@rust-lang.org> | 2018-03-26 18:41:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-03-26 18:41:38 +0000 |
| commit | 188e693b392116c46f746e86f8521f9621fcfd43 (patch) | |
| tree | 21205e49317c0c351e2ef53a584559a213e862b8 /src/libstd | |
| parent | ab8b961677ac5c74762dcea955aa0ff4d7fe4915 (diff) | |
| parent | 140bf949bf65bb0479dbe31bd3474d5546ef59e1 (diff) | |
| download | rust-188e693b392116c46f746e86f8521f9621fcfd43.tar.gz rust-188e693b392116c46f746e86f8521f9621fcfd43.zip | |
Auto merge of #49101 - mark-i-m:stabilize_i128, r=nagisa
Stabilize 128-bit integers :tada: cc #35118 EDIT: This should be merged only after the following have been merged: - [x] https://github.com/rust-lang-nursery/compiler-builtins/pull/236 - [x] https://github.com/rust-lang/book/pull/1230
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 7 | ||||
| -rw-r--r-- | src/libstd/net/ip.rs | 4 | ||||
| -rw-r--r-- | src/libstd/num.rs | 7 | ||||
| -rw-r--r-- | src/libstd/primitive_docs.rs | 4 |
4 files changed, 8 insertions, 14 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 0b06c5d4d65..93996868f16 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -269,8 +269,7 @@ #![feature(generic_param_attrs)] #![feature(hashmap_internals)] #![feature(heap_api)] -#![feature(i128)] -#![feature(i128_type)] +#![cfg_attr(stage0, feature(i128_type, i128))] #![feature(int_error_internals)] #![feature(integer_atomics)] #![feature(into_cow)] @@ -435,7 +434,7 @@ pub use core::i16; pub use core::i32; #[stable(feature = "rust1", since = "1.0.0")] pub use core::i64; -#[unstable(feature = "i128", issue = "35118")] +#[stable(feature = "i128", since = "1.26.0")] pub use core::i128; #[stable(feature = "rust1", since = "1.0.0")] pub use core::usize; @@ -465,7 +464,7 @@ pub use alloc::string; pub use alloc::vec; #[stable(feature = "rust1", since = "1.0.0")] pub use std_unicode::char; -#[unstable(feature = "i128", issue = "35118")] +#[stable(feature = "i128", since = "1.26.0")] pub use core::u128; pub mod f32; diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index 031fae6d59b..25fa9095536 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -1355,7 +1355,7 @@ impl FromInner<c::in6_addr> for Ipv6Addr { } } -#[unstable(feature = "i128", issue = "35118")] +#[stable(feature = "i128", since = "1.26.0")] impl From<Ipv6Addr> for u128 { fn from(ip: Ipv6Addr) -> u128 { let ip = ip.segments(); @@ -1364,7 +1364,7 @@ impl From<Ipv6Addr> for u128 { ((ip[6] as u128) << 16) + (ip[7] as u128) } } -#[unstable(feature = "i128", issue = "35118")] +#[stable(feature = "i128", since = "1.26.0")] impl From<u128> for Ipv6Addr { fn from(ip: u128) -> Ipv6Addr { Ipv6Addr::new( diff --git a/src/libstd/num.rs b/src/libstd/num.rs index 6f537fd5c50..547b8c7c925 100644 --- a/src/libstd/num.rs +++ b/src/libstd/num.rs @@ -24,14 +24,9 @@ pub use core::num::Wrapping; #[unstable(feature = "nonzero", issue = "49137")] pub use core::num::{ NonZeroU8, NonZeroI8, NonZeroU16, NonZeroI16, NonZeroU32, NonZeroI32, - NonZeroU64, NonZeroI64, NonZeroUsize, NonZeroIsize, + NonZeroU64, NonZeroI64, NonZeroU128, NonZeroI128, NonZeroUsize, NonZeroIsize, }; -// Change this to `#[unstable(feature = "i128", issue = "35118")]` -// if other NonZero* integer types are stabilizied before 128-bit integers -#[unstable(feature = "nonzero", issue = "49137")] -pub use core::num::{NonZeroU128, NonZeroI128}; - #[cfg(test)] use fmt; #[cfg(test)] use ops::{Add, Sub, Mul, Div, Rem}; diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index e6e6be2e453..ce4bbfffc2e 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -751,7 +751,7 @@ mod prim_i64 { } /// The 128-bit signed integer type. /// /// *[See also the `std::i128` module](i128/index.html).* -#[unstable(feature = "i128", issue="35118")] +#[stable(feature = "i128", since="1.26.0")] mod prim_i128 { } #[doc(primitive = "u8")] @@ -791,7 +791,7 @@ mod prim_u64 { } /// The 128-bit unsigned integer type. /// /// *[See also the `std::u128` module](u128/index.html).* -#[unstable(feature = "i128", issue="35118")] +#[stable(feature = "i128", since="1.26.0")] mod prim_u128 { } #[doc(primitive = "isize")] |
