about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/intrinsics.rs7
-rw-r--r--src/libcore/lib.rs11
-rw-r--r--src/libcore/mem/mod.rs1
-rw-r--r--src/libcore/num/mod.rs11
-rw-r--r--src/libcore/ops/function.rs2
-rw-r--r--src/libcore/ptr/const_ptr.rs2
-rw-r--r--src/libcore/ptr/mut_ptr.rs2
-rw-r--r--src/libcore/slice/mod.rs12
8 files changed, 5 insertions, 43 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 45b636b0089..080760aa81f 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -1927,7 +1927,6 @@ extern "rust-intrinsic" {
     /// The to-be-stabilized version of this intrinsic is
     /// [`std::mem::variant_count`](../../std/mem/fn.variant_count.html)
     #[rustc_const_unstable(feature = "variant_count", issue = "73662")]
-    #[cfg(not(bootstrap))]
     pub fn variant_count<T>() -> usize;
 
     /// Rust's "try catch" construct which invokes the function pointer `try_fn`
@@ -1958,7 +1957,6 @@ extern "rust-intrinsic" {
     /// Internal placeholder for injecting code coverage counters when the "instrument-coverage"
     /// option is enabled. The placeholder is replaced with `llvm.instrprof.increment` during code
     /// generation.
-    #[cfg(not(bootstrap))]
     #[lang = "count_code_region"]
     pub fn count_code_region(index: u32, start_byte_pos: u32, end_byte_pos: u32);
 
@@ -1968,7 +1966,6 @@ extern "rust-intrinsic" {
     /// "coverage map", which is injected into the generated code, as additional data.
     /// This marker identifies a code region and two other counters or counter expressions
     /// whose sum is the number of times the code region was executed.
-    #[cfg(not(bootstrap))]
     pub fn coverage_counter_add(
         index: u32,
         left_index: u32,
@@ -1980,7 +1977,6 @@ extern "rust-intrinsic" {
     /// This marker identifies a code region and two other counters or counter expressions
     /// whose difference is the number of times the code region was executed.
     /// (See `coverage_counter_add` for more information.)
-    #[cfg(not(bootstrap))]
     pub fn coverage_counter_subtract(
         index: u32,
         left_index: u32,
@@ -1992,17 +1988,14 @@ extern "rust-intrinsic" {
     /// This marker identifies a code region to be added to the "coverage map" to indicate source
     /// code that can never be reached.
     /// (See `coverage_counter_add` for more information.)
-    #[cfg(not(bootstrap))]
     pub fn coverage_unreachable(start_byte_pos: u32, end_byte_pos: u32);
 
     /// See documentation of `<*const T>::guaranteed_eq` for details.
     #[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
-    #[cfg(not(bootstrap))]
     pub fn ptr_guaranteed_eq<T>(ptr: *const T, other: *const T) -> bool;
 
     /// See documentation of `<*const T>::guaranteed_ne` for details.
     #[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
-    #[cfg(not(bootstrap))]
     pub fn ptr_guaranteed_ne<T>(ptr: *const T, other: *const T) -> bool;
 }
 
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index c2dc3e5985f..96436bb253d 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -73,8 +73,6 @@
 #![feature(const_ascii_ctype_on_intrinsics)]
 #![feature(const_alloc_layout)]
 #![feature(const_discriminant)]
-#![cfg_attr(bootstrap, feature(const_if_match))]
-#![cfg_attr(bootstrap, feature(const_loop))]
 #![feature(const_checked_int_methods)]
 #![feature(const_euclidean_int_methods)]
 #![feature(const_overflowing_int_methods)]
@@ -87,7 +85,7 @@
 #![feature(const_generics)]
 #![feature(const_ptr_offset)]
 #![feature(const_ptr_offset_from)]
-#![cfg_attr(not(bootstrap), feature(const_raw_ptr_comparison))]
+#![feature(const_raw_ptr_comparison)]
 #![feature(const_result)]
 #![feature(const_slice_from_raw_parts)]
 #![feature(const_slice_ptr_len)]
@@ -121,13 +119,12 @@
 #![feature(staged_api)]
 #![feature(std_internals)]
 #![feature(stmt_expr_attributes)]
-#![cfg_attr(bootstrap, feature(track_caller))]
 #![feature(transparent_unions)]
 #![feature(unboxed_closures)]
 #![feature(unsized_locals)]
 #![feature(untagged_unions)]
 #![feature(unwind_attributes)]
-#![cfg_attr(not(bootstrap), feature(variant_count))]
+#![feature(variant_count)]
 #![feature(doc_alias)]
 #![feature(mmx_target_feature)]
 #![feature(tbm_target_feature)]
@@ -142,7 +139,7 @@
 #![feature(rtm_target_feature)]
 #![feature(f16c_target_feature)]
 #![feature(hexagon_target_feature)]
-#![cfg_attr(not(bootstrap), feature(const_fn_transmute))]
+#![feature(const_fn_transmute)]
 #![feature(abi_unadjusted)]
 #![feature(adx_target_feature)]
 #![feature(maybe_uninit_slice)]
@@ -293,7 +290,7 @@ pub mod primitive;
 )]
 // FIXME: This annotation should be moved into rust-lang/stdarch after clashing_extern_declarations is
 // merged. It currently cannot because bootstrap fails as the lint hasn't been defined yet.
-#[cfg_attr(not(bootstrap), allow(clashing_extern_declarations))]
+#[allow(clashing_extern_declarations)]
 #[unstable(feature = "stdsimd", issue = "48556")]
 mod core_arch;
 
diff --git a/src/libcore/mem/mod.rs b/src/libcore/mem/mod.rs
index 98d2027268b..d62de7617a0 100644
--- a/src/libcore/mem/mod.rs
+++ b/src/libcore/mem/mod.rs
@@ -1037,7 +1037,6 @@ pub const fn discriminant<T>(v: &T) -> Discriminant<T> {
 /// assert_eq!(mem::variant_count::<Result<!, !>>(), 2);
 /// ```
 #[inline(always)]
-#[cfg(not(bootstrap))]
 #[unstable(feature = "variant_count", issue = "73662")]
 #[rustc_const_unstable(feature = "variant_count", issue = "73662")]
 pub const fn variant_count<T>() -> usize {
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index f4a1afd436a..7392a678b05 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -21,14 +21,6 @@ macro_rules! try_opt {
     };
 }
 
-#[cfg(bootstrap)]
-macro_rules! unlikely {
-    ($e: expr) => {
-        $e
-    };
-}
-
-#[cfg(not(bootstrap))]
 #[allow_internal_unstable(const_likely)]
 macro_rules! unlikely {
     ($e: expr) => {
@@ -1600,7 +1592,6 @@ $EndFeature, "
             #[stable(feature = "no_panic_abs", since = "1.13.0")]
             #[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
             #[allow(unused_attributes)]
-            #[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
             #[inline]
             pub const fn wrapping_abs(self) -> Self {
                  if self.is_negative() {
@@ -1889,7 +1880,6 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_neg(), (", stringify!($Self
             #[stable(feature = "wrapping", since = "1.7.0")]
             #[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
             #[allow(unused_attributes)]
-            #[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
             pub const fn overflowing_neg(self) -> (Self, bool) {
                 if unlikely!(self == Self::MIN) {
                     (Self::MIN, true)
@@ -2182,7 +2172,6 @@ $EndFeature, "
             #[stable(feature = "rust1", since = "1.0.0")]
             #[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")]
             #[allow(unused_attributes)]
-            #[cfg_attr(bootstrap, allow_internal_unstable(const_if_match))]
             #[inline]
             #[rustc_inherit_overflow_checks]
             pub const fn abs(self) -> Self {
diff --git a/src/libcore/ops/function.rs b/src/libcore/ops/function.rs
index 2cdfee87a35..22a738d0bc1 100644
--- a/src/libcore/ops/function.rs
+++ b/src/libcore/ops/function.rs
@@ -224,7 +224,7 @@ pub trait FnMut<Args>: FnOnce<Args> {
 #[must_use = "closures are lazy and do nothing unless called"]
 pub trait FnOnce<Args> {
     /// The returned type after the call operator is used.
-    #[cfg_attr(not(bootstrap), lang = "fn_once_output")]
+    #[lang = "fn_once_output"]
     #[stable(feature = "fn_once_output", since = "1.12.0")]
     type Output;
 
diff --git a/src/libcore/ptr/const_ptr.rs b/src/libcore/ptr/const_ptr.rs
index 39d4aca636a..896ad740e1e 100644
--- a/src/libcore/ptr/const_ptr.rs
+++ b/src/libcore/ptr/const_ptr.rs
@@ -324,7 +324,6 @@ impl<T: ?Sized> *const T {
     #[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
     #[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
     #[inline]
-    #[cfg(not(bootstrap))]
     pub const fn guaranteed_eq(self, other: *const T) -> bool
     where
         T: Sized,
@@ -356,7 +355,6 @@ impl<T: ?Sized> *const T {
     #[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
     #[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
     #[inline]
-    #[cfg(not(bootstrap))]
     pub const fn guaranteed_ne(self, other: *const T) -> bool
     where
         T: Sized,
diff --git a/src/libcore/ptr/mut_ptr.rs b/src/libcore/ptr/mut_ptr.rs
index 644465d7d17..96856e7512c 100644
--- a/src/libcore/ptr/mut_ptr.rs
+++ b/src/libcore/ptr/mut_ptr.rs
@@ -305,7 +305,6 @@ impl<T: ?Sized> *mut T {
     #[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
     #[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
     #[inline]
-    #[cfg(not(bootstrap))]
     pub const fn guaranteed_eq(self, other: *mut T) -> bool
     where
         T: Sized,
@@ -337,7 +336,6 @@ impl<T: ?Sized> *mut T {
     #[unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
     #[rustc_const_unstable(feature = "const_raw_ptr_comparison", issue = "53020")]
     #[inline]
-    #[cfg(not(bootstrap))]
     pub const unsafe fn guaranteed_ne(self, other: *mut T) -> bool
     where
         T: Sized,
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index 0e202bb7801..309a4ddb006 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -6233,14 +6233,8 @@ where
             return false;
         }
 
-        #[cfg(bootstrap)]
-        if self.as_ptr() == other.as_ptr() {
-            return true;
-        }
-
         // While performance would suffer if `guaranteed_eq` just returned `false`
         // for all arguments, correctness and return value of this function are not affected.
-        #[cfg(not(bootstrap))]
         if self.as_ptr().guaranteed_eq(other.as_ptr()) {
             return true;
         }
@@ -6259,14 +6253,8 @@ where
             return false;
         }
 
-        #[cfg(bootstrap)]
-        if self.as_ptr() == other.as_ptr() {
-            return true;
-        }
-
         // While performance would suffer if `guaranteed_eq` just returned `false`
         // for all arguments, correctness and return value of this function are not affected.
-        #[cfg(not(bootstrap))]
         if self.as_ptr().guaranteed_eq(other.as_ptr()) {
             return true;
         }