From b4c91f9a525096b52eaf3f0ffc5b147e39bca4a8 Mon Sep 17 00:00:00 2001 From: BenoƮt du Garreau Date: Wed, 18 Nov 2020 18:15:03 +0100 Subject: Add #[cold] to `abort` and `handle_alloc_error` --- library/alloc/src/alloc.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'library/alloc/src') diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs index 3427c83a18f..7fcbffa7e43 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(any(test, bootstrap)))] #[rustc_allocator_nounwind] +#[cold] pub fn handle_alloc_error(layout: Layout) -> ! { unsafe { __rust_alloc_error_handler(layout.size(), layout.align()); -- cgit 1.4.1-3-g733a5