Skip to content

Commit

Permalink
Fix missed i128 feature gates
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-i-m committed Mar 26, 2018
1 parent ea89b50 commit 0710469
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 66 deletions.
2 changes: 1 addition & 1 deletion src/doc/unstable-book/src/language-features/repr128.md
@@ -1,4 +1,4 @@
# `repri128`
# `repr128`

The tracking issue for this feature is: [#35118]

Expand Down
24 changes: 12 additions & 12 deletions src/libcore/num/mod.rs
Expand Up @@ -4046,39 +4046,39 @@ macro_rules! impl_from {
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.
Expand Down
4 changes: 2 additions & 2 deletions src/libstd/primitive_docs.rs
Expand Up @@ -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")]
Expand Down Expand Up @@ -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")]
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/diagnostic_list.rs
Expand Up @@ -250,7 +250,7 @@ An unstable feature was used.
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),
}
Expand All @@ -264,7 +264,7 @@ If you're using a nightly version of rustc, just add the corresponding feature
to be able to use it:
```
#![feature(repri128)]
#![feature(repr128)]
#[repr(u128)] // ok!
enum Foo {
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/saturating-float-casts.rs
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/u128-as-f32.rs
Expand Up @@ -10,7 +10,7 @@

// ignore-emscripten u128 not supported

#![feature(test, i128)]
#![feature(test)]
#![deny(overflowing_literals)]
extern crate test;

Expand Down
34 changes: 0 additions & 34 deletions src/test/ui/feature-gate-i128_type2.rs

This file was deleted.

13 changes: 0 additions & 13 deletions src/test/ui/feature-gate-i128_type2.stderr

This file was deleted.

0 comments on commit 0710469

Please sign in to comment.