diff options
| author | bors <bors@rust-lang.org> | 2020-11-23 02:25:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-23 02:25:13 +0000 |
| commit | f32459c7ba767e7f26e3c4c4bd6be326d83bcb78 (patch) | |
| tree | 761b73c26c7cdba3c25d4be8acf496f91a8226ed /library/alloc/src/alloc.rs | |
| parent | 32da90b431919eedb3e281a91caea063ba4edb77 (diff) | |
| parent | b4c91f9a525096b52eaf3f0ffc5b147e39bca4a8 (diff) | |
| download | rust-f32459c7ba767e7f26e3c4c4bd6be326d83bcb78.tar.gz rust-f32459c7ba767e7f26e3c4c4bd6be326d83bcb78.zip | |
Auto merge of #79172 - a1phyr:cold_abort, r=Mark-Simulacrum
Add #[cold] attribute to `std::process::abort` and `alloc::alloc::handle_alloc_error`
Diffstat (limited to 'library/alloc/src/alloc.rs')
| -rw-r--r-- | library/alloc/src/alloc.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs index edbbe3603a7..b1bfc2abe44 100644 --- a/library/alloc/src/alloc.rs +++ b/library/alloc/src/alloc.rs @@ -360,6 +360,7 @@ extern "Rust" { #[stable(feature = "global_alloc", since = "1.28.0")] #[cfg(not(test))] #[rustc_allocator_nounwind] +#[cold] pub fn handle_alloc_error(layout: Layout) -> ! { unsafe { __rust_alloc_error_handler(layout.size(), layout.align()); |
