From 81932be5e7a4730ec966543824f3f186510e2e94 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Fri, 26 Feb 2021 22:38:24 +0100 Subject: [PATCH] Revert "Revert stabilizing integer::BITS." --- compiler/rustc_data_structures/src/lib.rs | 1 - compiler/rustc_serialize/src/lib.rs | 1 - compiler/rustc_serialize/tests/leb128.rs | 1 - library/alloc/src/lib.rs | 1 - library/alloc/tests/lib.rs | 1 - library/core/src/num/int_macros.rs | 3 +-- library/core/src/num/uint_macros.rs | 3 +-- library/core/tests/lib.rs | 1 - library/panic_unwind/src/lib.rs | 1 - 9 files changed, 2 insertions(+), 11 deletions(-) diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index fcb2bca7b4cc1..123618a440de2 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -13,7 +13,6 @@ #![feature(unboxed_closures)] #![feature(generator_trait)] #![feature(fn_traits)] -#![feature(int_bits_const)] #![feature(min_specialization)] #![feature(auto_traits)] #![feature(nll)] diff --git a/compiler/rustc_serialize/src/lib.rs b/compiler/rustc_serialize/src/lib.rs index 40b9522949d01..cf5a9118275d9 100644 --- a/compiler/rustc_serialize/src/lib.rs +++ b/compiler/rustc_serialize/src/lib.rs @@ -16,7 +16,6 @@ Core encoding and decoding interfaces. #![feature(min_specialization)] #![feature(vec_spare_capacity)] #![feature(core_intrinsics)] -#![feature(int_bits_const)] #![feature(maybe_uninit_array_assume_init)] #![feature(maybe_uninit_uninit_array)] #![feature(maybe_uninit_slice)] diff --git a/compiler/rustc_serialize/tests/leb128.rs b/compiler/rustc_serialize/tests/leb128.rs index a2bcf2c251d7a..3e2aab5125ab7 100644 --- a/compiler/rustc_serialize/tests/leb128.rs +++ b/compiler/rustc_serialize/tests/leb128.rs @@ -1,4 +1,3 @@ -#![feature(int_bits_const)] #![feature(maybe_uninit_slice)] #![feature(maybe_uninit_uninit_array)] diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index f34d25e01fc2f..40f2de8f70dd3 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -103,7 +103,6 @@ #![feature(fn_traits)] #![feature(fundamental)] #![feature(inplace_iteration)] -#![feature(int_bits_const)] // Technically, this is a bug in rustdoc: rustdoc sees the documentation on `#[lang = slice_alloc]` // blocks is for `&[T]`, which also has documentation using this feature in `core`, and gets mad // that the feature-gate isn't enabled. Ideally, it wouldn't check for the feature gate for docs diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs index 06874bff44ed6..c75a6c1f61990 100644 --- a/library/alloc/tests/lib.rs +++ b/library/alloc/tests/lib.rs @@ -16,7 +16,6 @@ #![feature(binary_heap_retain)] #![feature(inplace_iteration)] #![feature(iter_map_while)] -#![feature(int_bits_const)] #![feature(vecdeque_binary_search)] #![feature(slice_group_by)] #![feature(slice_partition_dedup)] diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 79737b48d790d..9e7af22539541 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -32,10 +32,9 @@ macro_rules! int_impl { /// # Examples /// /// ``` - /// #![feature(int_bits_const)] #[doc = concat!("assert_eq!(", stringify!($SelfT), "::BITS, ", stringify!($BITS), ");")] /// ``` - #[unstable(feature = "int_bits_const", issue = "76904")] + #[stable(feature = "int_bits_const", since = "1.51.0")] pub const BITS: u32 = $BITS; /// Converts a string slice in a given base to an integer. diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index 7393e7f923e1f..4f4ebed1eda0b 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -32,10 +32,9 @@ macro_rules! uint_impl { /// # Examples /// /// ``` - /// #![feature(int_bits_const)] #[doc = concat!("assert_eq!(", stringify!($SelfT), "::BITS, ", stringify!($BITS), ");")] /// ``` - #[unstable(feature = "int_bits_const", issue = "76904")] + #[stable(feature = "int_bits_const", since = "1.51.0")] pub const BITS: u32 = $BITS; /// Converts a string slice in a given base to an integer. diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs index b7fcc74036381..8f797aeed0def 100644 --- a/library/core/tests/lib.rs +++ b/library/core/tests/lib.rs @@ -73,7 +73,6 @@ #![cfg_attr(not(bootstrap), feature(ptr_metadata))] #![feature(once_cell)] #![feature(unsized_tuple_coercion)] -#![feature(int_bits_const)] #![feature(nonzero_leading_trailing_zeros)] #![feature(const_option)] #![feature(integer_atomics)] diff --git a/library/panic_unwind/src/lib.rs b/library/panic_unwind/src/lib.rs index 9ce9c477ec0f0..99a0c67fc11b9 100644 --- a/library/panic_unwind/src/lib.rs +++ b/library/panic_unwind/src/lib.rs @@ -18,7 +18,6 @@ issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/" )] #![feature(core_intrinsics)] -#![feature(int_bits_const)] #![feature(lang_items)] #![feature(nll)] #![feature(panic_unwind)]