From 89882388d931d2e4d0d30c73fc1aa9c56f4df110 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Wed, 3 Feb 2021 22:23:58 +0100 Subject: [PATCH] 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, 11 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_data_structures/src/lib.rs b/compiler/rustc_data_structures/src/lib.rs index 36d261fb737..5880bbd3de4 100644 --- a/compiler/rustc_data_structures/src/lib.rs +++ b/compiler/rustc_data_structures/src/lib.rs @@ -13,6 +13,7 @@ #![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 ea04e7bb44b..53c3adcc20c 100644 --- a/compiler/rustc_serialize/src/lib.rs +++ b/compiler/rustc_serialize/src/lib.rs @@ -17,6 +17,7 @@ Core encoding and decoding interfaces. #![feature(min_specialization)] #![feature(vec_spare_capacity)] #![feature(core_intrinsics)] +#![feature(int_bits_const)] #![feature(maybe_uninit_slice)] #![feature(new_uninit)] #![cfg_attr(test, feature(test))] diff --git a/compiler/rustc_serialize/tests/leb128.rs b/compiler/rustc_serialize/tests/leb128.rs index 3e2aab5125a..a2bcf2c251d 100644 --- a/compiler/rustc_serialize/tests/leb128.rs +++ b/compiler/rustc_serialize/tests/leb128.rs @@ -1,3 +1,4 @@ +#![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 0a1ecced49a..a49979fb7aa 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -102,6 +102,7 @@ #![feature(fn_traits)] #![feature(fundamental)] #![feature(inplace_iteration)] +#![feature(int_bits_const)] #![feature(lang_items)] #![feature(layout_for_ptr)] #![feature(maybe_uninit_ref)] diff --git a/library/alloc/tests/lib.rs b/library/alloc/tests/lib.rs index 9c7343e8cbf..dd98f806451 100644 --- a/library/alloc/tests/lib.rs +++ b/library/alloc/tests/lib.rs @@ -17,6 +17,7 @@ #![feature(binary_heap_retain)] #![feature(inplace_iteration)] #![feature(iter_map_while)] +#![feature(int_bits_const)] #![feature(vecdeque_binary_search)] #![feature(slice_group_by)] #![feature(vec_extend_from_within)] diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 96affd17cc5..8fdd7c9e5d7 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -32,9 +32,10 @@ macro_rules! int_impl { /// # Examples /// /// ``` + /// #![feature(int_bits_const)] #[doc = concat!("assert_eq!(", stringify!($SelfT), "::BITS, ", stringify!($BITS), ");")] /// ``` - #[stable(feature = "int_bits_const", since = "1.51.0")] + #[unstable(feature = "int_bits_const", issue = "76904")] 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 aee424b9b13..9fccf3f72ce 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -32,9 +32,10 @@ macro_rules! uint_impl { /// # Examples /// /// ``` + /// #![feature(int_bits_const)] #[doc = concat!("assert_eq!(", stringify!($SelfT), "::BITS, ", stringify!($BITS), ");")] /// ``` - #[stable(feature = "int_bits_const", since = "1.51.0")] + #[unstable(feature = "int_bits_const", issue = "76904")] 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 26dbcb8569b..bc0e3e059c9 100644 --- a/library/core/tests/lib.rs +++ b/library/core/tests/lib.rs @@ -70,6 +70,7 @@ #![feature(partition_point)] #![feature(once_cell)] #![feature(unsafe_block_in_unsafe_fn)] +#![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 99a0c67fc11..9ce9c477ec0 100644 --- a/library/panic_unwind/src/lib.rs +++ b/library/panic_unwind/src/lib.rs @@ -18,6 +18,7 @@ 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)]