Stabilize i128 feature too

This commit is contained in:
Mark Mansi 2018-03-16 20:15:56 -05:00
parent 33d9d8e0c6
commit db7d9ea480
10 changed files with 21 additions and 29 deletions

View File

@ -9,7 +9,7 @@ The tracking issue for this feature is: [#35118]
The `i128` feature adds support for `#[repr(u128)]` on `enum`s.
```rust
#![feature(i128)]
#![feature(repri128)]
#[repr(u128)]
enum Foo {

View File

@ -12,6 +12,6 @@
//!
//! *[See also the `i128` primitive type](../../std/primitive.i128.html).*
#![unstable(feature = "i128", issue="35118")]
#![stable(feature = "i128", since = "1.26.0")]
int_module! { i128, #[unstable(feature = "i128", issue="35118")] }
int_module! { i128, #[stable(feature = "i128", since="1.26.0")] }

View File

@ -1635,10 +1635,7 @@ impl i64 {
#[lang = "i128"]
impl i128 {
int_impl! { i128, i128, u128, 128, -170141183460469231731687303715884105728,
170141183460469231731687303715884105727, "#![feature(i128)]
# fn main() {
", "
# }" }
170141183460469231731687303715884105727, "", "" }
}
#[cfg(target_pointer_width = "16")]
@ -3492,11 +3489,7 @@ impl u64 {
#[lang = "u128"]
impl u128 {
uint_impl! { u128, u128, 128, 340282366920938463463374607431768211455, "#![feature(i128)]
# fn main() {
", "
# }" }
uint_impl! { u128, u128, 128, 340282366920938463463374607431768211455, "", "" }
}
#[cfg(target_pointer_width = "16")]

View File

@ -52,8 +52,7 @@
#![feature(entry_or_default)]
#![feature(from_ref)]
#![feature(fs_read_write)]
#![feature(i128)]
#![cfg_attr(stage0, feature(i128_type))]
#![cfg_attr(stage0, feature(i128_type, i128))]
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
#![cfg_attr(windows, feature(libc))]
#![feature(match_default_bindings)]

View File

@ -19,8 +19,7 @@
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(warnings)]
#![feature(i128)]
#![cfg_attr(stage0, feature(i128_type))]
#![cfg_attr(stage0, feature(i128_type, i128))]
extern crate rustc_apfloat;

View File

@ -26,9 +26,8 @@
#![feature(unboxed_closures)]
#![feature(fn_traits)]
#![feature(unsize)]
#![cfg_attr(stage0, feature(i128_type))]
#![feature(i128)]
#![cfg_attr(stage0, feature(conservative_impl_trait))]
#![cfg_attr(stage0, feature(i128_type, i128))]
#![feature(specialization)]
#![feature(optin_builtin_traits)]
#![feature(underscore_lifetimes)]

View File

@ -24,8 +24,7 @@
#![feature(custom_attribute)]
#![feature(fs_read_write)]
#![allow(unused_attributes)]
#![cfg_attr(stage0, feature(i128_type))]
#![feature(i128)]
#![cfg_attr(stage0, feature(i128_type, i128))]
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
#![feature(libc)]
#![feature(quote)]

View File

@ -269,8 +269,7 @@
#![feature(generic_param_attrs)]
#![feature(hashmap_internals)]
#![feature(heap_api)]
#![feature(i128)]
#![cfg_attr(stage0, 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;

View File

@ -250,7 +250,10 @@ An unstable feature was used.
Erroneous code example:
```compile_fail,E658
let x = ::std::u128::MAX; // error: use of unstable library feature 'i128'
#[repr(u128)] // error: use of unstable library feature 'i128'
enum Foo {
Bar(u64),
}
```
If you're using a stable or a beta version of rustc, you won't be able to use
@ -261,10 +264,11 @@ If you're using a nightly version of rustc, just add the corresponding feature
to be able to use it:
```
#![feature(i128)]
#![feature(repri128)]
fn main() {
let x = ::std::u128::MAX; // ok!
#[repr(u128)] // ok!
enum Foo {
Bar(u64),
}
```
"##,

View File

@ -4,7 +4,7 @@ error[E0658]: use of unstable library feature 'i128' (see issue #35118)
LL | let _ = ::std::u128::MAX; //~ ERROR E0658
| ^^^^^^^^^^^^^^^^
|
= help: add #![feature(i128)] to the crate attributes to enable
= help: add #![feature(repri128)] to the crate attributes to enable
error: aborting due to previous error