1
Fork 0

Auto merge of #79172 - a1phyr:cold_abort, r=Mark-Simulacrum

Add #[cold] attribute to `std::process::abort` and `alloc::alloc::handle_alloc_error`
This commit is contained in:
bors 2020-11-23 02:25:13 +00:00
commit f32459c7ba
2 changed files with 2 additions and 0 deletions

View file

@ -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());