diff options
| author | bors <bors@rust-lang.org> | 2016-12-31 18:54:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-12-31 18:54:31 +0000 |
| commit | 38bd207626fa46445d58404099b0a2f0bf8e0934 (patch) | |
| tree | 0763e040e47b547921f654e31894f7a67145df6d /src/libstd | |
| parent | 6185c5445210966cfd1acb011b4faf4b4eaf9d97 (diff) | |
| parent | 29e01af6a68817a12c1fc5fa04c483d2200c3cbb (diff) | |
| download | rust-38bd207626fa46445d58404099b0a2f0bf8e0934.tar.gz rust-38bd207626fa46445d58404099b0a2f0bf8e0934.zip | |
Auto merge of #38482 - est31:i128, r=eddyb
i128 and u128 support Brings i128 and u128 support to nightly rust, behind a feature flag. The goal of this PR is to do the bulk of the work for 128 bit integer support. Smaller but just as tricky features needed for stabilisation like 128 bit enum discriminants are left for future PRs. Rebased version of #37900, which in turn was a rebase + improvement of #35954 . Sadly I couldn't reopen #37900 due to github. There goes my premium position in the homu queue... [plugin-breaking-change] cc #35118 (tracking issue)
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 7 | ||||
| -rw-r--r-- | src/libstd/primitive_docs.rs | 22 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index fc5c6968544..f1e3996e825 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -301,6 +301,7 @@ #![feature(unwind_attributes)] #![feature(vec_push_all)] #![feature(zero_one)] +#![feature(i128)] #![cfg_attr(test, feature(update_panic_count))] // Explicitly import the prelude. The compiler uses this same unstable attribute @@ -395,6 +396,9 @@ pub use core::i16; pub use core::i32; #[stable(feature = "rust1", since = "1.0.0")] pub use core::i64; +#[unstable(feature = "i128", issue = "35118")] +#[cfg(not(stage0))] +pub use core::i128; #[stable(feature = "rust1", since = "1.0.0")] pub use core::usize; #[stable(feature = "rust1", since = "1.0.0")] @@ -423,6 +427,9 @@ pub use core_collections::string; pub use core_collections::vec; #[stable(feature = "rust1", since = "1.0.0")] pub use std_unicode::char; +#[unstable(feature = "i128", issue = "35118")] +#[cfg(not(stage0))] +pub use core::u128; pub mod f32; pub mod f64; diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index 54dde6681e1..5981b482a97 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -597,6 +597,17 @@ mod prim_i32 { } /// mod prim_i64 { } +#[doc(primitive = "i128")] +// +/// The 128-bit signed integer type. +/// +/// *[See also the `std::i128` module](i128/index.html).* +/// +/// However, please note that examples are shared between primitive integer +/// types. So it's normal if you see usage of types like `i8` in there. +/// +mod prim_i128 { } + #[doc(primitive = "u8")] // /// The 8-bit unsigned integer type. @@ -641,6 +652,17 @@ mod prim_u32 { } /// mod prim_u64 { } +#[doc(primitive = "u128")] +// +/// The 128-bit unsigned integer type. +/// +/// *[See also the `std::u128` module](u128/index.html).* +/// +/// However, please note that examples are shared between primitive integer +/// types. So it's normal if you see usage of types like `u8` in there. +/// +mod prim_u128 { } + #[doc(primitive = "isize")] // /// The pointer-sized signed integer type. |
