about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorJake Goulding <jake.goulding@gmail.com>2020-11-19 15:01:48 -0500
committerJake Goulding <jake.goulding@gmail.com>2020-11-19 19:23:36 -0500
commitdcef5ff372742eb3d8a1b5cbbc2141e757bc33d1 (patch)
tree19a1c632281f8187c2b5e7d397528e4a55df41ab /library/alloc/src
parent3d3c8c5e0d534cdd794f1b3359089eba031d492c (diff)
downloadrust-dcef5ff372742eb3d8a1b5cbbc2141e757bc33d1.tar.gz
rust-dcef5ff372742eb3d8a1b5cbbc2141e757bc33d1.zip
Bump bootstrap compiler version
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/alloc.rs19
-rw-r--r--library/alloc/src/lib.rs5
-rw-r--r--library/alloc/src/raw_vec.rs3
3 files changed, 5 insertions, 22 deletions
diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs
index 3427c83a18f..edbbe3603a7 100644
--- a/library/alloc/src/alloc.rs
+++ b/library/alloc/src/alloc.rs
@@ -358,7 +358,7 @@ extern "Rust" {
 /// [`set_alloc_error_hook`]: ../../std/alloc/fn.set_alloc_error_hook.html
 /// [`take_alloc_error_hook`]: ../../std/alloc/fn.take_alloc_error_hook.html
 #[stable(feature = "global_alloc", since = "1.28.0")]
-#[cfg(not(any(test, bootstrap)))]
+#[cfg(not(test))]
 #[rustc_allocator_nounwind]
 pub fn handle_alloc_error(layout: Layout) -> ! {
     unsafe {
@@ -370,22 +370,7 @@ pub fn handle_alloc_error(layout: Layout) -> ! {
 #[cfg(test)]
 pub use std::alloc::handle_alloc_error;
 
-// In stage0 (bootstrap) `__rust_alloc_error_handler`,
-// might not be generated yet, because an old compiler is used,
-// so use the old direct call.
-#[cfg(all(bootstrap, not(test)))]
-#[stable(feature = "global_alloc", since = "1.28.0")]
-#[doc(hidden)]
-#[rustc_allocator_nounwind]
-pub fn handle_alloc_error(layout: Layout) -> ! {
-    extern "Rust" {
-        #[lang = "oom"]
-        fn oom_impl(layout: Layout) -> !;
-    }
-    unsafe { oom_impl(layout) }
-}
-
-#[cfg(not(any(target_os = "hermit", test, bootstrap)))]
+#[cfg(not(any(target_os = "hermit", test)))]
 #[doc(hidden)]
 #[allow(unused_attributes)]
 #[unstable(feature = "alloc_internals", issue = "none")]
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs
index f21fc8854d0..dc5db49ee98 100644
--- a/library/alloc/src/lib.rs
+++ b/library/alloc/src/lib.rs
@@ -72,7 +72,7 @@
 #![allow(explicit_outlives_requirements)]
 #![allow(incomplete_features)]
 #![deny(unsafe_op_in_unsafe_fn)]
-#![cfg_attr(not(bootstrap), feature(rustc_allow_const_fn_unstable))]
+#![feature(rustc_allow_const_fn_unstable)]
 #![cfg_attr(not(test), feature(generator_trait))]
 #![cfg_attr(test, feature(test))]
 #![cfg_attr(test, feature(new_uninit))]
@@ -130,8 +130,7 @@
 #![feature(unicode_internals)]
 #![feature(unsafe_block_in_unsafe_fn)]
 #![feature(unsize)]
-#![cfg_attr(not(bootstrap), feature(unsized_fn_params))]
-#![cfg_attr(bootstrap, feature(unsized_locals))]
+#![feature(unsized_fn_params)]
 #![feature(allocator_internals)]
 #![feature(slice_partition_dedup)]
 #![feature(maybe_uninit_extra, maybe_uninit_slice, maybe_uninit_uninit_array)]
diff --git a/library/alloc/src/raw_vec.rs b/library/alloc/src/raw_vec.rs
index 522c5bcf5af..0c9b491ce32 100644
--- a/library/alloc/src/raw_vec.rs
+++ b/library/alloc/src/raw_vec.rs
@@ -116,8 +116,7 @@ impl<T> RawVec<T, Global> {
 impl<T, A: AllocRef> RawVec<T, A> {
     /// Like `new`, but parameterized over the choice of allocator for
     /// the returned `RawVec`.
-    #[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))]
-    #[cfg_attr(bootstrap, allow_internal_unstable(const_fn))]
+    #[rustc_allow_const_fn_unstable(const_fn)]
     pub const fn new_in(alloc: A) -> Self {
         // `cap: 0` means "unallocated". zero-sized types are ignored.
         Self { ptr: Unique::dangling(), cap: 0, alloc }