diff options
| author | Jake Goulding <jake.goulding@gmail.com> | 2020-11-19 15:01:48 -0500 |
|---|---|---|
| committer | Jake Goulding <jake.goulding@gmail.com> | 2020-11-19 19:23:36 -0500 |
| commit | dcef5ff372742eb3d8a1b5cbbc2141e757bc33d1 (patch) | |
| tree | 19a1c632281f8187c2b5e7d397528e4a55df41ab /library/alloc/src/alloc.rs | |
| parent | 3d3c8c5e0d534cdd794f1b3359089eba031d492c (diff) | |
| download | rust-dcef5ff372742eb3d8a1b5cbbc2141e757bc33d1.tar.gz rust-dcef5ff372742eb3d8a1b5cbbc2141e757bc33d1.zip | |
Bump bootstrap compiler version
Diffstat (limited to 'library/alloc/src/alloc.rs')
| -rw-r--r-- | library/alloc/src/alloc.rs | 19 |
1 files changed, 2 insertions, 17 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")] |
