about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-06-05 11:11:26 +0000
committerbors <bors@rust-lang.org>2020-06-05 11:11:26 +0000
commit84ec8238b14b4cf89e82eae11907b59629baff2c (patch)
tree663eaea0128817e74861767f19eb284cd16b2ff0 /src/libcore
parent219380d840877de97b0e17674be7212ebc929d51 (diff)
parent71393422495b8d3c7a6e4ded3e64adaec45dca6d (diff)
downloadrust-84ec8238b14b4cf89e82eae11907b59629baff2c.tar.gz
rust-84ec8238b14b4cf89e82eae11907b59629baff2c.zip
Auto merge of #72957 - Mark-Simulacrum:bootstrap-bump, r=sfackler
Bump bootstrap compiler to 1.45

Pretty standard update.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/intrinsics.rs5
-rw-r--r--src/libcore/marker.rs14
-rw-r--r--src/libcore/ops/try.rs2
-rw-r--r--src/libcore/panicking.rs21
4 files changed, 5 insertions, 37 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 2d97fecf8a7..85076a573b5 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -54,7 +54,6 @@
 )]
 #![allow(missing_docs)]
 
-#[cfg(not(bootstrap))]
 use crate::marker::DiscriminantKind;
 use crate::mem;
 
@@ -1916,11 +1915,7 @@ extern "rust-intrinsic" {
     /// The stabilized version of this intrinsic is
     /// [`std::mem::discriminant`](../../std/mem/fn.discriminant.html)
     #[rustc_const_unstable(feature = "const_discriminant", issue = "69821")]
-    #[cfg(not(bootstrap))]
     pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
-    #[rustc_const_unstable(feature = "const_discriminant", issue = "69821")]
-    #[cfg(bootstrap)]
-    pub fn discriminant_value<T>(v: &T) -> u64;
 
     /// Rust's "try catch" construct which invokes the function pointer `try_fn`
     /// with the data pointer `data`.
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
index c0c0f66aff9..6040dd31847 100644
--- a/src/libcore/marker.rs
+++ b/src/libcore/marker.rs
@@ -692,25 +692,13 @@ mod impls {
     issue = "none",
     reason = "this trait is unlikely to ever be stabilized, use `mem::discriminant` instead"
 )]
-#[cfg_attr(not(bootstrap), lang = "discriminant_kind")]
+#[lang = "discriminant_kind"]
 pub trait DiscriminantKind {
     /// The type of the dicriminant, which must satisfy the trait
     /// bounds required by `mem::Discriminant`.
     type Discriminant: Clone + Copy + Debug + Eq + PartialEq + Hash + Send + Sync + Unpin;
 }
 
-// Manually implement `DiscriminantKind` for all types during bootstrap
-// to reduce the required amount of conditional compilation.
-#[unstable(
-    feature = "discriminant_kind",
-    issue = "none",
-    reason = "this trait is unlikely to ever be stabilized, use `mem::discriminant` instead"
-)]
-#[cfg(bootstrap)]
-impl<T: ?Sized> DiscriminantKind for T {
-    type Discriminant = u64;
-}
-
 /// Compiler-internal trait used to determine whether a type contains
 /// any `UnsafeCell` internally, but not through an indirection.
 /// This affects, for example, whether a `static` of that type is
diff --git a/src/libcore/ops/try.rs b/src/libcore/ops/try.rs
index e15ea11569f..9bc35ae1f5c 100644
--- a/src/libcore/ops/try.rs
+++ b/src/libcore/ops/try.rs
@@ -25,7 +25,7 @@
     )
 )]
 #[doc(alias = "?")]
-#[cfg_attr(not(bootstrap), lang = "try")]
+#[lang = "try"]
 pub trait Try {
     /// The type of this value when viewed as successful.
     #[unstable(feature = "try_trait", issue = "42327")]
diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs
index 16739b4a1af..3ed5e65e11c 100644
--- a/src/libcore/panicking.rs
+++ b/src/libcore/panicking.rs
@@ -39,12 +39,7 @@ use crate::panic::{Location, PanicInfo};
 #[lang = "panic"] // needed by codegen for panic on overflow and other `Assert` MIR terminators
 pub fn panic(expr: &str) -> ! {
     if cfg!(feature = "panic_immediate_abort") {
-        // remove `unsafe` (and safety comment) on bootstrap bump
-        #[cfg_attr(not(bootstrap), allow(unused_unsafe))]
-        // SAFETY: the `abort` intrinsic has no requirements to be called.
-        unsafe {
-            super::intrinsics::abort()
-        }
+        super::intrinsics::abort()
     }
 
     // Use Arguments::new_v1 instead of format_args!("{}", expr) to potentially
@@ -62,12 +57,7 @@ pub fn panic(expr: &str) -> ! {
 #[lang = "panic_bounds_check"] // needed by codegen for panic on OOB array/slice access
 fn panic_bounds_check(index: usize, len: usize) -> ! {
     if cfg!(feature = "panic_immediate_abort") {
-        // remove `unsafe` (and safety comment) on bootstrap bump
-        #[cfg_attr(not(bootstrap), allow(unused_unsafe))]
-        // SAFETY: the `abort` intrinsic has no requirements to be called.
-        unsafe {
-            super::intrinsics::abort()
-        }
+        super::intrinsics::abort()
     }
 
     panic!("index out of bounds: the len is {} but the index is {}", len, index)
@@ -80,12 +70,7 @@ fn panic_bounds_check(index: usize, len: usize) -> ! {
 #[track_caller]
 pub fn panic_fmt(fmt: fmt::Arguments<'_>) -> ! {
     if cfg!(feature = "panic_immediate_abort") {
-        // remove `unsafe` (and safety comment) on bootstrap bump
-        #[cfg_attr(not(bootstrap), allow(unused_unsafe))]
-        // SAFETY: the `abort` intrinsic has no requirements to be called.
-        unsafe {
-            super::intrinsics::abort()
-        }
+        super::intrinsics::abort()
     }
 
     // NOTE This function never crosses the FFI boundary; it's a Rust-to-Rust call