about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-07 07:34:04 +0000
committerbors <bors@rust-lang.org>2022-04-07 07:34:04 +0000
commitf565016eddc3cb812e647d54b06cfe74bdee2900 (patch)
tree2ff05c1dacc33d2a51c0c80b3551301275a6e308 /library/core/src
parent8cd6080f6c778f6664ea3d12ca7848231707a627 (diff)
parentb500a78ac1dc70bef53ead56f5a1671bb9fd3d4c (diff)
downloadrust-f565016eddc3cb812e647d54b06cfe74bdee2900.tar.gz
rust-f565016eddc3cb812e647d54b06cfe74bdee2900.zip
Auto merge of #95678 - pietroalbini:pa-1.62.0-bootstrap, r=Mark-Simulacrum
Bump bootstrap compiler to 1.61.0 beta

This PR bumps the bootstrap compiler to the 1.61.0 beta. The first commit changes the stage0 compiler, the second commit applies the "mechanical" changes and the third and fourth commits apply changes explained in the relevant comments.

r? `@Mark-Simulacrum`
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/array/mod.rs1
-rw-r--r--library/core/src/bool.rs7
-rw-r--r--library/core/src/char/methods.rs1
-rw-r--r--library/core/src/clone.rs3
-rw-r--r--library/core/src/intrinsics.rs6
-rw-r--r--library/core/src/lib.rs9
-rw-r--r--library/core/src/marker.rs11
-rw-r--r--library/core/src/num/f32.rs1
-rw-r--r--library/core/src/num/f64.rs1
-rw-r--r--library/core/src/num/mod.rs16
-rw-r--r--library/core/src/option.rs74
-rw-r--r--library/core/src/panicking.rs1
-rw-r--r--library/core/src/ptr/const_ptr.rs2
-rw-r--r--library/core/src/ptr/mut_ptr.rs2
-rw-r--r--library/core/src/result.rs25
-rw-r--r--library/core/src/slice/ascii.rs1
-rw-r--r--library/core/src/slice/mod.rs1
-rw-r--r--library/core/src/str/mod.rs1
18 files changed, 48 insertions, 115 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index 9e42ab5923a..af661e485f5 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -395,7 +395,6 @@ macro_rules! array_impl_default {
 
 array_impl_default! {32, T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T}
 
-#[cfg_attr(bootstrap, lang = "array")]
 impl<T, const N: usize> [T; N] {
     /// Returns an array of the same size as `self`, with function `f` applied to each element
     /// in order.
diff --git a/library/core/src/bool.rs b/library/core/src/bool.rs
index 06aee3ccbaf..36000f8f389 100644
--- a/library/core/src/bool.rs
+++ b/library/core/src/bool.rs
@@ -2,7 +2,6 @@
 
 use crate::marker::Destruct;
 
-#[cfg_attr(bootstrap, lang = "bool")]
 impl bool {
     /// Returns `Some(t)` if the `bool` is [`true`](../std/keyword.true.html),
     /// or `None` otherwise.
@@ -18,10 +17,9 @@ impl bool {
     #[unstable(feature = "bool_to_option", issue = "80967")]
     #[rustc_const_unstable(feature = "const_bool_to_option", issue = "91917")]
     #[inline]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn then_some<T>(self, t: T) -> Option<T>
     where
-        T: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
     {
         if self { Some(t) } else { None }
     }
@@ -38,11 +36,10 @@ impl bool {
     #[stable(feature = "lazy_bool_to_option", since = "1.50.0")]
     #[rustc_const_unstable(feature = "const_bool_to_option", issue = "91917")]
     #[inline]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn then<T, F>(self, f: F) -> Option<T>
     where
         F: ~const FnOnce() -> T,
-        F: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
     {
         if self { Some(f()) } else { None }
     }
diff --git a/library/core/src/char/methods.rs b/library/core/src/char/methods.rs
index 6a8df7318cd..5809ed1f33b 100644
--- a/library/core/src/char/methods.rs
+++ b/library/core/src/char/methods.rs
@@ -7,7 +7,6 @@ use crate::unicode::{self, conversions};
 
 use super::*;
 
-#[cfg_attr(bootstrap, lang = "char")]
 impl char {
     /// The highest valid code point a `char` can have, `'\u{10FFFF}'`.
     ///
diff --git a/library/core/src/clone.rs b/library/core/src/clone.rs
index cfdc51c71ee..0444a9575d1 100644
--- a/library/core/src/clone.rs
+++ b/library/core/src/clone.rs
@@ -130,10 +130,9 @@ pub trait Clone: Sized {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[default_method_body_is_const]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     fn clone_from(&mut self, source: &Self)
     where
-        Self: ~const Drop + ~const Destruct,
+        Self: ~const Destruct,
     {
         *self = source.clone()
     }
diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs
index 27063952adb..8e02ca84317 100644
--- a/library/core/src/intrinsics.rs
+++ b/library/core/src/intrinsics.rs
@@ -2358,7 +2358,6 @@ pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
 #[rustc_const_unstable(feature = "const_eval_select", issue = "none")]
 #[lang = "const_eval_select"]
 #[rustc_do_not_const_check]
-#[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
 pub const unsafe fn const_eval_select<ARG, F, G, RET>(
     arg: ARG,
     _called_in_const: F,
@@ -2366,7 +2365,7 @@ pub const unsafe fn const_eval_select<ARG, F, G, RET>(
 ) -> RET
 where
     F: ~const FnOnce<ARG, Output = RET>,
-    G: FnOnce<ARG, Output = RET> + ~const Drop + ~const Destruct,
+    G: FnOnce<ARG, Output = RET> + ~const Destruct,
 {
     called_at_rt.call_once(arg)
 }
@@ -2378,7 +2377,6 @@ where
 )]
 #[rustc_const_unstable(feature = "const_eval_select", issue = "none")]
 #[lang = "const_eval_select_ct"]
-#[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
 pub const unsafe fn const_eval_select_ct<ARG, F, G, RET>(
     arg: ARG,
     called_in_const: F,
@@ -2386,7 +2384,7 @@ pub const unsafe fn const_eval_select_ct<ARG, F, G, RET>(
 ) -> RET
 where
     F: ~const FnOnce<ARG, Output = RET>,
-    G: FnOnce<ARG, Output = RET> + ~const Drop + ~const Destruct,
+    G: FnOnce<ARG, Output = RET> + ~const Destruct,
 {
     called_in_const.call_once(arg)
 }
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index e13f50b0d7a..660f6d92fe1 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -84,7 +84,7 @@
     target_has_atomic_load_store = "ptr",
 ))]
 #![no_core]
-#![cfg_attr(not(bootstrap), rustc_coherence_is_core)]
+#![rustc_coherence_is_core]
 //
 // Lints:
 #![deny(rust_2021_incompatible_or_patterns)]
@@ -163,15 +163,12 @@
 #![feature(cfg_target_has_atomic)]
 #![feature(cfg_target_has_atomic_equal_alignment)]
 #![feature(const_fn_floating_point_arithmetic)]
-#![cfg_attr(bootstrap, feature(const_fn_fn_ptr_basics))]
-#![cfg_attr(bootstrap, feature(const_fn_trait_bound))]
-#![cfg_attr(bootstrap, feature(const_impl_trait))]
 #![feature(const_mut_refs)]
 #![feature(const_precise_live_drops)]
 #![feature(const_refs_to_cell)]
 #![feature(decl_macro)]
 #![feature(derive_default_enum)]
-#![cfg_attr(not(bootstrap), feature(deprecated_suggestion))]
+#![feature(deprecated_suggestion)]
 #![feature(doc_cfg)]
 #![feature(doc_notable_trait)]
 #![feature(rustdoc_internals)]
@@ -208,7 +205,6 @@
 #![feature(asm_const)]
 //
 // Target features:
-#![cfg_attr(bootstrap, feature(aarch64_target_feature))]
 #![feature(arm_target_feature)]
 #![feature(avx512_target_feature)]
 #![feature(cmpxchg16b_target_feature)]
@@ -220,7 +216,6 @@
 #![feature(sse4a_target_feature)]
 #![feature(tbm_target_feature)]
 #![feature(wasm_target_feature)]
-#![cfg_attr(bootstrap, feature(adx_target_feature))]
 
 // allow using `core::` in intra-doc links
 #[allow(unused_extern_crates)]
diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs
index 6b9d6253e42..4a90ef9545d 100644
--- a/library/core/src/marker.rs
+++ b/library/core/src/marker.rs
@@ -797,17 +797,10 @@ impl<T: ?Sized> Unpin for *mut T {}
 /// This should be used for `~const` bounds,
 /// as non-const bounds will always hold for every type.
 #[unstable(feature = "const_trait_impl", issue = "67792")]
-#[cfg_attr(not(bootstrap), lang = "destruct")]
-#[cfg_attr(
-    not(bootstrap),
-    rustc_on_unimplemented(message = "can't drop `{Self}`", append_const_msg,)
-)]
+#[lang = "destruct"]
+#[rustc_on_unimplemented(message = "can't drop `{Self}`", append_const_msg)]
 pub trait Destruct {}
 
-#[cfg(bootstrap)]
-#[unstable(feature = "const_trait_impl", issue = "67792")]
-impl<T: ?Sized> const Destruct for T {}
-
 /// Implementations of `Copy` for primitive types.
 ///
 /// Implementations that cannot be described in Rust
diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs
index e56e602a662..a983d0872bc 100644
--- a/library/core/src/num/f32.rs
+++ b/library/core/src/num/f32.rs
@@ -370,7 +370,6 @@ pub mod consts {
     pub const LN_10: f32 = 2.30258509299404568401799145468436421_f32;
 }
 
-#[cfg_attr(bootstrap, lang = "f32")]
 #[cfg(not(test))]
 impl f32 {
     /// The radix or base of the internal representation of `f32`.
diff --git a/library/core/src/num/f64.rs b/library/core/src/num/f64.rs
index 8304caf649c..05598e5fe7b 100644
--- a/library/core/src/num/f64.rs
+++ b/library/core/src/num/f64.rs
@@ -370,7 +370,6 @@ pub mod consts {
     pub const LN_10: f64 = 2.30258509299404568401799145468436421_f64;
 }
 
-#[cfg_attr(bootstrap, lang = "f64")]
 #[cfg(not(test))]
 impl f64 {
     /// The radix or base of the internal representation of `f64`.
diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs
index 8cbece0417b..a30d2ff0ea6 100644
--- a/library/core/src/num/mod.rs
+++ b/library/core/src/num/mod.rs
@@ -193,26 +193,22 @@ macro_rules! widening_impl {
     };
 }
 
-#[cfg_attr(bootstrap, lang = "i8")]
 impl i8 {
     int_impl! { i8, i8, u8, 8, 7, -128, 127, 2, "-0x7e", "0xa", "0x12", "0x12", "0x48",
     "[0x12]", "[0x12]", "", "" }
 }
 
-#[cfg_attr(bootstrap, lang = "i16")]
 impl i16 {
     int_impl! { i16, i16, u16, 16, 15, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234", "0x3412",
     "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]", "", "" }
 }
 
-#[cfg_attr(bootstrap, lang = "i32")]
 impl i32 {
     int_impl! { i32, i32, u32, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301",
     "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]",
     "[0x12, 0x34, 0x56, 0x78]", "", "" }
 }
 
-#[cfg_attr(bootstrap, lang = "i64")]
 impl i64 {
     int_impl! { i64, i64, u64, 64, 63, -9223372036854775808, 9223372036854775807, 12,
     "0xaa00000000006e1", "0x6e10aa", "0x1234567890123456", "0x5634129078563412",
@@ -220,7 +216,6 @@ impl i64 {
     "[0x12, 0x34, 0x56, 0x78, 0x90, 0x12, 0x34, 0x56]", "", "" }
 }
 
-#[cfg_attr(bootstrap, lang = "i128")]
 impl i128 {
     int_impl! { i128, i128, u128, 128, 127, -170141183460469231731687303715884105728,
     170141183460469231731687303715884105727, 16,
@@ -233,7 +228,6 @@ impl i128 {
 }
 
 #[cfg(target_pointer_width = "16")]
-#[cfg_attr(bootstrap, lang = "isize")]
 impl isize {
     int_impl! { isize, i16, usize, 16, 15, -32768, 32767, 4, "-0x5ffd", "0x3a", "0x1234",
     "0x3412", "0x2c48", "[0x34, 0x12]", "[0x12, 0x34]",
@@ -241,7 +235,6 @@ impl isize {
 }
 
 #[cfg(target_pointer_width = "32")]
-#[cfg_attr(bootstrap, lang = "isize")]
 impl isize {
     int_impl! { isize, i32, usize, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301",
     "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]",
@@ -250,7 +243,6 @@ impl isize {
 }
 
 #[cfg(target_pointer_width = "64")]
-#[cfg_attr(bootstrap, lang = "isize")]
 impl isize {
     int_impl! { isize, i64, usize, 64, 63, -9223372036854775808, 9223372036854775807,
     12, "0xaa00000000006e1", "0x6e10aa",  "0x1234567890123456", "0x5634129078563412",
@@ -262,7 +254,6 @@ impl isize {
 /// If 6th bit set ascii is upper case.
 const ASCII_CASE_MASK: u8 = 0b0010_0000;
 
-#[cfg_attr(bootstrap, lang = "u8")]
 impl u8 {
     uint_impl! { u8, u8, i8, NonZeroU8, 8, 255, 2, "0x82", "0xa", "0x12", "0x12", "0x48", "[0x12]",
     "[0x12]", "", "" }
@@ -816,7 +807,6 @@ impl u8 {
     }
 }
 
-#[cfg_attr(bootstrap, lang = "u16")]
 impl u16 {
     uint_impl! { u16, u16, i16, NonZeroU16, 16, 65535, 4, "0xa003", "0x3a", "0x1234", "0x3412", "0x2c48",
     "[0x34, 0x12]", "[0x12, 0x34]", "", "" }
@@ -848,14 +838,12 @@ impl u16 {
     }
 }
 
-#[cfg_attr(bootstrap, lang = "u32")]
 impl u32 {
     uint_impl! { u32, u32, i32, NonZeroU32, 32, 4294967295, 8, "0x10000b3", "0xb301", "0x12345678",
     "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]", "[0x12, 0x34, 0x56, 0x78]", "", "" }
     widening_impl! { u32, u64, 32, unsigned }
 }
 
-#[cfg_attr(bootstrap, lang = "u64")]
 impl u64 {
     uint_impl! { u64, u64, i64, NonZeroU64, 64, 18446744073709551615, 12, "0xaa00000000006e1", "0x6e10aa",
     "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48",
@@ -865,7 +853,6 @@ impl u64 {
     widening_impl! { u64, u128, 64, unsigned }
 }
 
-#[cfg_attr(bootstrap, lang = "u128")]
 impl u128 {
     uint_impl! { u128, u128, i128, NonZeroU128, 128, 340282366920938463463374607431768211455, 16,
     "0x13f40000000000000000000000004f76", "0x4f7613f4", "0x12345678901234567890123456789012",
@@ -878,7 +865,6 @@ impl u128 {
 }
 
 #[cfg(target_pointer_width = "16")]
-#[cfg_attr(bootstrap, lang = "usize")]
 impl usize {
     uint_impl! { usize, u16, isize, NonZeroUsize, 16, 65535, 4, "0xa003", "0x3a", "0x1234", "0x3412", "0x2c48",
     "[0x34, 0x12]", "[0x12, 0x34]",
@@ -886,7 +872,6 @@ impl usize {
     widening_impl! { usize, u32, 16, unsigned }
 }
 #[cfg(target_pointer_width = "32")]
-#[cfg_attr(bootstrap, lang = "usize")]
 impl usize {
     uint_impl! { usize, u32, isize, NonZeroUsize, 32, 4294967295, 8, "0x10000b3", "0xb301", "0x12345678",
     "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]", "[0x12, 0x34, 0x56, 0x78]",
@@ -895,7 +880,6 @@ impl usize {
 }
 
 #[cfg(target_pointer_width = "64")]
-#[cfg_attr(bootstrap, lang = "usize")]
 impl usize {
     uint_impl! { usize, u64, isize, NonZeroUsize, 64, 18446744073709551615, 12, "0xaa00000000006e1", "0x6e10aa",
     "0x1234567890123456", "0x5634129078563412", "0x6a2c48091e6a2c48",
diff --git a/library/core/src/option.rs b/library/core/src/option.rs
index b5ca9e35dce..91e4708f6a6 100644
--- a/library/core/src/option.rs
+++ b/library/core/src/option.rs
@@ -773,10 +773,9 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn unwrap_or(self, default: T) -> T
     where
-        T: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
     {
         match self {
             Some(x) => x,
@@ -796,11 +795,10 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn unwrap_or_else<F>(self, f: F) -> T
     where
         F: ~const FnOnce() -> T,
-        F: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
     {
         match self {
             Some(x) => x,
@@ -902,11 +900,10 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn map<U, F>(self, f: F) -> Option<U>
     where
         F: ~const FnOnce(T) -> U,
-        F: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
     {
         match self {
             Some(x) => Some(f(x)),
@@ -932,11 +929,10 @@ impl<T> Option<T> {
     #[inline]
     #[unstable(feature = "result_option_inspect", issue = "91345")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn inspect<F>(self, f: F) -> Self
     where
         F: ~const FnOnce(&T),
-        F: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
     {
         if let Some(ref x) = self {
             f(x);
@@ -966,12 +962,11 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn map_or<U, F>(self, default: U, f: F) -> U
     where
         F: ~const FnOnce(T) -> U,
-        F: ~const Drop + ~const Destruct,
-        U: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
+        U: ~const Destruct,
     {
         match self {
             Some(t) => f(t),
@@ -996,13 +991,12 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn map_or_else<U, D, F>(self, default: D, f: F) -> U
     where
         D: ~const FnOnce() -> U,
-        D: ~const Drop + ~const Destruct,
+        D: ~const Destruct,
         F: ~const FnOnce(T) -> U,
-        F: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
     {
         match self {
             Some(t) => f(t),
@@ -1034,10 +1028,9 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn ok_or<E>(self, err: E) -> Result<T, E>
     where
-        E: ~const Drop + ~const Destruct,
+        E: ~const Destruct,
     {
         match self {
             Some(v) => Ok(v),
@@ -1064,11 +1057,10 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn ok_or_else<E, F>(self, err: F) -> Result<T, E>
     where
         F: ~const FnOnce() -> E,
-        F: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
     {
         match self {
             Some(v) => Ok(v),
@@ -1199,11 +1191,10 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn and<U>(self, optb: Option<U>) -> Option<U>
     where
-        T: ~const Drop + ~const Destruct,
-        U: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
+        U: ~const Destruct,
     {
         match self {
             Some(_) => optb,
@@ -1242,11 +1233,10 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn and_then<U, F>(self, f: F) -> Option<U>
     where
         F: ~const FnOnce(T) -> Option<U>,
-        F: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
     {
         match self {
             Some(x) => f(x),
@@ -1281,12 +1271,11 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "option_filter", since = "1.27.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn filter<P>(self, predicate: P) -> Self
     where
-        T: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
         P: ~const FnOnce(&T) -> bool,
-        P: ~const Drop + ~const Destruct,
+        P: ~const Destruct,
     {
         if let Some(x) = self {
             if predicate(&x) {
@@ -1326,10 +1315,9 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn or(self, optb: Option<T>) -> Option<T>
     where
-        T: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
     {
         match self {
             Some(x) => Some(x),
@@ -1353,11 +1341,10 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn or_else<F>(self, f: F) -> Option<T>
     where
         F: ~const FnOnce() -> Option<T>,
-        F: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
     {
         match self {
             Some(x) => Some(x),
@@ -1389,10 +1376,9 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "option_xor", since = "1.37.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn xor(self, optb: Option<T>) -> Option<T>
     where
-        T: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
     {
         match (self, optb) {
             (Some(a), None) => Some(a),
@@ -1428,10 +1414,9 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "option_insert", since = "1.53.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn insert(&mut self, value: T) -> &mut T
     where
-        T: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
     {
         *self = Some(value);
 
@@ -1462,10 +1447,9 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "option_entry", since = "1.20.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn get_or_insert(&mut self, value: T) -> &mut T
     where
-        T: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
     {
         if let None = *self {
             *self = Some(value);
@@ -1530,11 +1514,10 @@ impl<T> Option<T> {
     #[inline]
     #[stable(feature = "option_entry", since = "1.20.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn get_or_insert_with<F>(&mut self, f: F) -> &mut T
     where
         F: ~const FnOnce() -> T,
-        F: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
     {
         if let None = *self {
             // the compiler isn't smart enough to know that we are not dropping a `T`
@@ -1645,11 +1628,10 @@ impl<T> Option<T> {
     /// ```
     #[stable(feature = "option_zip_option", since = "1.46.0")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn zip<U>(self, other: Option<U>) -> Option<(T, U)>
     where
-        T: ~const Drop + ~const Destruct,
-        U: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
+        U: ~const Destruct,
     {
         match (self, other) {
             (Some(a), Some(b)) => Some((a, b)),
@@ -1687,13 +1669,12 @@ impl<T> Option<T> {
     /// ```
     #[unstable(feature = "option_zip", issue = "70086")]
     #[rustc_const_unstable(feature = "const_option_ext", issue = "91930")]
-    #[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
     pub const fn zip_with<U, F, R>(self, other: Option<U>, f: F) -> Option<R>
     where
         F: ~const FnOnce(T, U) -> R,
-        F: ~const Drop + ~const Destruct,
-        T: ~const Drop + ~const Destruct,
-        U: ~const Drop + ~const Destruct,
+        F: ~const Destruct,
+        T: ~const Destruct,
+        U: ~const Destruct,
     {
         match (self, other) {
             (Some(a), Some(b)) => Some(f(a, b)),
@@ -1880,10 +1861,9 @@ const fn expect_failed(msg: &str) -> ! {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 #[rustc_const_unstable(feature = "const_clone", issue = "91805")]
-#[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
 impl<T> const Clone for Option<T>
 where
-    T: ~const Clone + ~const Drop + ~const Destruct,
+    T: ~const Clone + ~const Destruct,
 {
     #[inline]
     fn clone(&self) -> Self {
diff --git a/library/core/src/panicking.rs b/library/core/src/panicking.rs
index a908b1f3ba4..7a575a88e52 100644
--- a/library/core/src/panicking.rs
+++ b/library/core/src/panicking.rs
@@ -88,7 +88,6 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
 // any extra arguments (including those synthesized by track_caller).
 #[cold]
 #[inline(never)]
-#[cfg_attr(bootstrap, track_caller)]
 #[lang = "panic_no_unwind"] // needed by codegen for panic in nounwind function
 fn panic_no_unwind() -> ! {
     if cfg!(feature = "panic_immediate_abort") {
diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs
index f862912432e..68f39dc4347 100644
--- a/library/core/src/ptr/const_ptr.rs
+++ b/library/core/src/ptr/const_ptr.rs
@@ -4,7 +4,6 @@ use crate::intrinsics;
 use crate::mem;
 use crate::slice::{self, SliceIndex};
 
-#[cfg_attr(bootstrap, lang = "const_ptr")]
 impl<T: ?Sized> *const T {
     /// Returns `true` if the pointer is null.
     ///
@@ -1086,7 +1085,6 @@ impl<T: ?Sized> *const T {
     }
 }
 
-#[cfg_attr(bootstrap, lang = "const_slice_ptr")]
 impl<T> *const [T] {
     /// Returns the length of a raw slice.
     ///
diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs
index 5db9c3e941e..4c9b0f7cc0c 100644
--- a/library/core/src/ptr/mut_ptr.rs
+++ b/library/core/src/ptr/mut_ptr.rs
@@ -3,7 +3,6 @@ use crate::cmp::Ordering::{self, Equal, Greater, Less};
 use crate::intrinsics;
 use crate::slice::{self, SliceIndex};
 
-#[cfg_attr(bootstrap, lang = "mut_ptr")]
 impl<T: ?Sized> *mut T {
     /// Returns `true` if the pointer is null.
     ///
@@ -1357,7 +1356,6 @@ impl<T: ?Sized> *mut T {
     }
 }
 
-#[cfg_attr(bootstrap, lang = "mut_slice_ptr")]
 impl<T> *mut [T] {
     /// Returns the length of a raw slice.
     ///
diff --git a/library/core/src/result.rs b/library/core/src/result.rs
index 641749be366..b2b132300a2 100644
--- a/library/core/src/result.rs
+++ b/library/core/src/result.rs
@@ -636,7 +636,7 @@ impl<T, E> Result<T, E> {
     #[rustc_const_unstable(feature = "const_result_drop", issue = "92384")]
     pub const fn ok(self) -> Option<T>
     where
-        E: ~const Drop + ~const Destruct,
+        E: ~const Destruct,
     {
         match self {
             Ok(x) => Some(x),
@@ -667,7 +667,7 @@ impl<T, E> Result<T, E> {
     #[rustc_const_unstable(feature = "const_result_drop", issue = "92384")]
     pub const fn err(self) -> Option<E>
     where
-        T: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
     {
         match self {
             // FIXME: ~const Drop doesn't quite work right yet
@@ -1283,9 +1283,9 @@ impl<T, E> Result<T, E> {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub const fn and<U>(self, res: Result<U, E>) -> Result<U, E>
     where
-        T: ~const Drop + ~const Destruct,
-        U: ~const Drop + ~const Destruct,
-        E: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
+        U: ~const Destruct,
+        E: ~const Destruct,
     {
         match self {
             // FIXME: ~const Drop doesn't quite work right yet
@@ -1368,9 +1368,9 @@ impl<T, E> Result<T, E> {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub const fn or<F>(self, res: Result<T, F>) -> Result<T, F>
     where
-        T: ~const Drop + ~const Destruct,
-        E: ~const Drop + ~const Destruct,
-        F: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
+        E: ~const Destruct,
+        F: ~const Destruct,
     {
         match self {
             Ok(v) => Ok(v),
@@ -1432,8 +1432,8 @@ impl<T, E> Result<T, E> {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub const fn unwrap_or(self, default: T) -> T
     where
-        T: ~const Drop + ~const Destruct,
-        E: ~const Drop + ~const Destruct,
+        T: ~const Destruct,
+        E: ~const Destruct,
     {
         match self {
             Ok(t) => t,
@@ -1803,11 +1803,10 @@ fn unwrap_failed<T>(_msg: &str, _error: &T) -> ! {
 
 #[stable(feature = "rust1", since = "1.0.0")]
 #[rustc_const_unstable(feature = "const_clone", issue = "91805")]
-#[cfg_attr(not(bootstrap), allow(drop_bounds))] // FIXME remove `~const Drop` and this attr when bumping
 impl<T, E> const Clone for Result<T, E>
 where
-    T: ~const Clone + ~const Drop + ~const Destruct,
-    E: ~const Clone + ~const Drop + ~const Destruct,
+    T: ~const Clone + ~const Destruct,
+    E: ~const Clone + ~const Destruct,
 {
     #[inline]
     fn clone(&self) -> Self {
diff --git a/library/core/src/slice/ascii.rs b/library/core/src/slice/ascii.rs
index 7c002130040..9aa5c88a62c 100644
--- a/library/core/src/slice/ascii.rs
+++ b/library/core/src/slice/ascii.rs
@@ -6,7 +6,6 @@ use crate::iter;
 use crate::mem;
 use crate::ops;
 
-#[cfg_attr(bootstrap, lang = "slice_u8")]
 #[cfg(not(test))]
 impl [u8] {
     /// Checks if all bytes in this slice are within the ASCII range.
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs
index 78fad46e793..2711c651339 100644
--- a/library/core/src/slice/mod.rs
+++ b/library/core/src/slice/mod.rs
@@ -110,7 +110,6 @@ enum Direction {
     Back,
 }
 
-#[cfg_attr(bootstrap, lang = "slice")]
 #[cfg(not(test))]
 impl<T> [T] {
     /// Returns the number of elements in the slice.
diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs
index a1779b78623..d855e736865 100644
--- a/library/core/src/str/mod.rs
+++ b/library/core/src/str/mod.rs
@@ -130,7 +130,6 @@ fn slice_error_fail_rt(s: &str, begin: usize, end: usize) -> ! {
     );
 }
 
-#[cfg_attr(bootstrap, lang = "str")]
 #[cfg(not(test))]
 impl str {
     /// Returns the length of `self`.