about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorBenoît du Garreau <benoit.dugarreau@platform.sh>2020-11-18 18:15:03 +0100
committerBenoît du Garreau <benoit.dugarreau@platform.sh>2020-11-18 18:15:03 +0100
commitb4c91f9a525096b52eaf3f0ffc5b147e39bca4a8 (patch)
treece0b215bc1138660ae029be442c05b1186c17f12 /library/alloc/src
parent7d747db0d5dd8f08f2efb073e2e77a34553465a7 (diff)
downloadrust-b4c91f9a525096b52eaf3f0ffc5b147e39bca4a8.tar.gz
rust-b4c91f9a525096b52eaf3f0ffc5b147e39bca4a8.zip
Add #[cold] to `abort` and `handle_alloc_error`
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/alloc.rs1
1 files changed, 1 insertions, 0 deletions
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());