1
Fork 0

Bump bootstrap compiler version

This commit is contained in:
Jake Goulding 2020-11-19 15:01:48 -05:00
parent 3d3c8c5e0d
commit dcef5ff372
18 changed files with 29 additions and 64 deletions

View file

@ -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")]

View file

@ -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)]

View file

@ -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 }