Skip to content

Commit db7d9ea

Browse files
committed
Stabilize i128 feature too
1 parent 33d9d8e commit db7d9ea

File tree

10 files changed

+21
-29
lines changed

10 files changed

+21
-29
lines changed

src/doc/unstable-book/src/language-features/i128-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The tracking issue for this feature is: [#35118]
99
The `i128` feature adds support for `#[repr(u128)]` on `enum`s.
1010

1111
```rust
12-
#![feature(i128)]
12+
#![feature(repri128)]
1313

1414
#[repr(u128)]
1515
enum Foo {

src/libcore/num/i128.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
//!
1313
//! *[See also the `i128` primitive type](../../std/primitive.i128.html).*
1414
15-
#![unstable(feature = "i128", issue="35118")]
15+
#![stable(feature = "i128", since = "1.26.0")]
1616

17-
int_module! { i128, #[unstable(feature = "i128", issue="35118")] }
17+
int_module! { i128, #[stable(feature = "i128", since="1.26.0")] }

src/libcore/num/mod.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,10 +1635,7 @@ impl i64 {
16351635
#[lang = "i128"]
16361636
impl i128 {
16371637
int_impl! { i128, i128, u128, 128, -170141183460469231731687303715884105728,
1638-
170141183460469231731687303715884105727, "#![feature(i128)]
1639-
# fn main() {
1640-
", "
1641-
# }" }
1638+
170141183460469231731687303715884105727, "", "" }
16421639
}
16431640

16441641
#[cfg(target_pointer_width = "16")]
@@ -3492,11 +3489,7 @@ impl u64 {
34923489

34933490
#[lang = "u128"]
34943491
impl u128 {
3495-
uint_impl! { u128, u128, 128, 340282366920938463463374607431768211455, "#![feature(i128)]
3496-
3497-
# fn main() {
3498-
", "
3499-
# }" }
3492+
uint_impl! { u128, u128, 128, 340282366920938463463374607431768211455, "", "" }
35003493
}
35013494

35023495
#[cfg(target_pointer_width = "16")]

src/librustc/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
#![feature(entry_or_default)]
5353
#![feature(from_ref)]
5454
#![feature(fs_read_write)]
55-
#![feature(i128)]
56-
#![cfg_attr(stage0, feature(i128_type))]
55+
#![cfg_attr(stage0, feature(i128_type, i128))]
5756
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
5857
#![cfg_attr(windows, feature(libc))]
5958
#![feature(match_default_bindings)]

src/librustc_const_math/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
html_root_url = "https://doc.rust-lang.org/nightly/")]
2020
#![deny(warnings)]
2121

22-
#![feature(i128)]
23-
#![cfg_attr(stage0, feature(i128_type))]
22+
#![cfg_attr(stage0, feature(i128_type, i128))]
2423

2524
extern crate rustc_apfloat;
2625

src/librustc_data_structures/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
#![feature(unboxed_closures)]
2727
#![feature(fn_traits)]
2828
#![feature(unsize)]
29-
#![cfg_attr(stage0, feature(i128_type))]
30-
#![feature(i128)]
3129
#![cfg_attr(stage0, feature(conservative_impl_trait))]
30+
#![cfg_attr(stage0, feature(i128_type, i128))]
3231
#![feature(specialization)]
3332
#![feature(optin_builtin_traits)]
3433
#![feature(underscore_lifetimes)]

src/librustc_trans/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
#![feature(custom_attribute)]
2525
#![feature(fs_read_write)]
2626
#![allow(unused_attributes)]
27-
#![cfg_attr(stage0, feature(i128_type))]
28-
#![feature(i128)]
27+
#![cfg_attr(stage0, feature(i128_type, i128))]
2928
#![cfg_attr(stage0, feature(inclusive_range_syntax))]
3029
#![feature(libc)]
3130
#![feature(quote)]

src/libstd/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@
269269
#![feature(generic_param_attrs)]
270270
#![feature(hashmap_internals)]
271271
#![feature(heap_api)]
272-
#![feature(i128)]
273-
#![cfg_attr(stage0, feature(i128_type))]
272+
#![cfg_attr(stage0, feature(i128_type, i128))]
274273
#![feature(int_error_internals)]
275274
#![feature(integer_atomics)]
276275
#![feature(into_cow)]
@@ -435,7 +434,7 @@ pub use core::i16;
435434
pub use core::i32;
436435
#[stable(feature = "rust1", since = "1.0.0")]
437436
pub use core::i64;
438-
#[unstable(feature = "i128", issue = "35118")]
437+
#[stable(feature = "i128", since = "1.26.0")]
439438
pub use core::i128;
440439
#[stable(feature = "rust1", since = "1.0.0")]
441440
pub use core::usize;
@@ -465,7 +464,7 @@ pub use alloc::string;
465464
pub use alloc::vec;
466465
#[stable(feature = "rust1", since = "1.0.0")]
467466
pub use std_unicode::char;
468-
#[unstable(feature = "i128", issue = "35118")]
467+
#[stable(feature = "i128", since = "1.26.0")]
469468
pub use core::u128;
470469

471470
pub mod f32;

src/libsyntax/diagnostic_list.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,10 @@ An unstable feature was used.
250250
Erroneous code example:
251251
252252
```compile_fail,E658
253-
let x = ::std::u128::MAX; // error: use of unstable library feature 'i128'
253+
#[repr(u128)] // error: use of unstable library feature 'i128'
254+
enum Foo {
255+
Bar(u64),
256+
}
254257
```
255258
256259
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
261264
to be able to use it:
262265
263266
```
264-
#![feature(i128)]
267+
#![feature(repri128)]
265268
266-
fn main() {
267-
let x = ::std::u128::MAX; // ok!
269+
#[repr(u128)] // ok!
270+
enum Foo {
271+
Bar(u64),
268272
}
269273
```
270274
"##,

src/test/ui/error-codes/E0658.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0658]: use of unstable library feature 'i128' (see issue #35118)
44
LL | let _ = ::std::u128::MAX; //~ ERROR E0658
55
| ^^^^^^^^^^^^^^^^
66
|
7-
= help: add #![feature(i128)] to the crate attributes to enable
7+
= help: add #![feature(repri128)] to the crate attributes to enable
88

99
error: aborting due to previous error
1010

0 commit comments

Comments
 (0)