]> git.lizzy.rs Git - rust.git/commitdiff
Fix missed i128 feature gates
authorMark Mansi <markm@cs.wisc.edu>
Sat, 17 Mar 2018 16:46:31 +0000 (11:46 -0500)
committerMark Mansi <markm@cs.wisc.edu>
Mon, 26 Mar 2018 13:37:56 +0000 (08:37 -0500)
src/doc/unstable-book/src/language-features/repr128.md
src/libcore/num/mod.rs
src/libstd/primitive_docs.rs
src/libsyntax/diagnostic_list.rs
src/test/run-pass/saturating-float-casts.rs
src/test/run-pass/u128-as-f32.rs
src/test/ui/feature-gate-i128_type2.rs [deleted file]
src/test/ui/feature-gate-i128_type2.stderr [deleted file]

index 3c86d581fa720317ac0ee4b761a235faba9a38c9..0858988952c105c3e987f16e977ed8510209aa61 100644 (file)
@@ -1,4 +1,4 @@
-# `repri128`
+# `repr128`
 
 The tracking issue for this feature is: [#35118]
 
index 66f7160827ab3a9a5d2f8f3f9994f07d06a8e2da..55186b0a3aca2adc72f4f3cf68febb34626f6e77 100644 (file)
@@ -4046,39 +4046,39 @@ fn from(small: $Small) -> $Large {
 impl_from! { u8, u16, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { u8, u32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { u8, u64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
-impl_from! { u8, u128, #[unstable(feature = "i128", issue = "35118")] }
+impl_from! { u8, u128, #[stable(feature = "i128", since = "1.26.0")] }
 impl_from! { u8, usize, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { u16, u32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { u16, u64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
-impl_from! { u16, u128, #[unstable(feature = "i128", issue = "35118")] }
+impl_from! { u16, u128, #[stable(feature = "i128", since = "1.26.0")] }
 impl_from! { u32, u64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
-impl_from! { u32, u128, #[unstable(feature = "i128", issue = "35118")] }
-impl_from! { u64, u128, #[unstable(feature = "i128", issue = "35118")] }
+impl_from! { u32, u128, #[stable(feature = "i128", since = "1.26.0")] }
+impl_from! { u64, u128, #[stable(feature = "i128", since = "1.26.0")] }
 
 // Signed -> Signed
 impl_from! { i8, i16, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { i8, i32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { i8, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
-impl_from! { i8, i128, #[unstable(feature = "i128", issue = "35118")] }
+impl_from! { i8, i128, #[stable(feature = "i128", since = "1.26.0")] }
 impl_from! { i8, isize, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { i16, i32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { i16, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
-impl_from! { i16, i128, #[unstable(feature = "i128", issue = "35118")] }
+impl_from! { i16, i128, #[stable(feature = "i128", since = "1.26.0")] }
 impl_from! { i32, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
-impl_from! { i32, i128, #[unstable(feature = "i128", issue = "35118")] }
-impl_from! { i64, i128, #[unstable(feature = "i128", issue = "35118")] }
+impl_from! { i32, i128, #[stable(feature = "i128", since = "1.26.0")] }
+impl_from! { i64, i128, #[stable(feature = "i128", since = "1.26.0")] }
 
 // Unsigned -> Signed
 impl_from! { u8, i16, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { u8, i32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { u8, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
-impl_from! { u8, i128, #[unstable(feature = "i128", issue = "35118")] }
+impl_from! { u8, i128, #[stable(feature = "i128", since = "1.26.0")] }
 impl_from! { u16, i32, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
 impl_from! { u16, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
-impl_from! { u16, i128, #[unstable(feature = "i128", issue = "35118")] }
+impl_from! { u16, i128, #[stable(feature = "i128", since = "1.26.0")] }
 impl_from! { u32, i64, #[stable(feature = "lossless_int_conv", since = "1.5.0")] }
-impl_from! { u32, i128, #[unstable(feature = "i128", issue = "35118")] }
-impl_from! { u64, i128, #[unstable(feature = "i128", issue = "35118")] }
+impl_from! { u32, i128, #[stable(feature = "i128", since = "1.26.0")] }
+impl_from! { u64, i128, #[stable(feature = "i128", since = "1.26.0")] }
 
 // Note: integers can only be represented with full precision in a float if
 // they fit in the significand, which is 24 bits in f32 and 53 bits in f64.
index e6e6be2e45379a9ab39b9188fac28ef114433d3e..ce4bbfffc2e47b0644c11821f7f7e41eba69c79f 100644 (file)
@@ -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")]
index 3246dc47701ea78558f1b4863336bd16aa23e0bb..bb7988e64bce9b9f7a9e0a272151a27e16a607a4 100644 (file)
@@ -250,7 +250,7 @@ fn main() {
 Erroneous code example:
 
 ```compile_fail,E658
-#[repr(u128)] // error: use of unstable library feature 'i128'
+#[repr(u128)] // error: use of unstable library feature 'repr128'
 enum Foo {
     Bar(u64),
 }
@@ -264,7 +264,7 @@ enum Foo {
 to be able to use it:
 
 ```
-#![feature(repri128)]
+#![feature(repr128)]
 
 #[repr(u128)] // ok!
 enum Foo {
index d1a0901bb3d6c6cf39f3bf39afa2aea131d5db7f..ad3b4b172594e47836ecdb6510f54b56e64cc04c 100644 (file)
@@ -11,7 +11,7 @@
 // Tests saturating float->int casts. See u128-as-f32.rs for the opposite direction.
 // compile-flags: -Z saturating-float-casts
 
-#![feature(test, i128, stmt_expr_attributes)]
+#![feature(test, stmt_expr_attributes)]
 #![deny(overflowing_literals)]
 extern crate test;
 
index 3531a961befdd67d9ac8e0790275151311e8559a..2848fb2d51a6be67c34c88e79d184b8e2995d7ff 100644 (file)
@@ -10,7 +10,7 @@
 
 // ignore-emscripten u128 not supported
 
-#![feature(test, i128)]
+#![feature(test)]
 #![deny(overflowing_literals)]
 extern crate test;
 
diff --git a/src/test/ui/feature-gate-i128_type2.rs b/src/test/ui/feature-gate-i128_type2.rs
deleted file mode 100644 (file)
index cd65b9d..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// gate-test-i128_type
-
-fn test1() -> i128 {
-    0
-}
-
-fn test1_2() -> u128 {
-    0
-}
-
-fn test3() {
-    let x: i128 = 0;
-}
-
-fn test3_2() {
-    let x: u128 = 0;
-}
-
-#[repr(u128)]
-enum A { //~ ERROR 128-bit type is unstable
-    A(u64)
-}
-
-fn main() {}
diff --git a/src/test/ui/feature-gate-i128_type2.stderr b/src/test/ui/feature-gate-i128_type2.stderr
deleted file mode 100644 (file)
index fe45578..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0658]: repr with 128-bit type is unstable (see issue #35118)
-  --> $DIR/feature-gate-i128_type2.rs:30:1
-   |
-LL | / enum A { //~ ERROR 128-bit type is unstable
-LL | |     A(u64)
-LL | | }
-   | |_^
-   |
-   = help: add #![feature(repr128)] to the crate attributes to enable
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0658`.