about summary refs log tree commit diff
path: root/library/alloc/src/alloc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/alloc/src/alloc.rs')
-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 db2d752cfde..cddf4f6f399 100644
--- a/library/alloc/src/alloc.rs
+++ b/library/alloc/src/alloc.rs
@@ -372,6 +372,7 @@ extern "Rust" {
 #[rustc_const_unstable(feature = "const_alloc_error", issue = "92523")]
 #[cfg(all(not(no_global_oom_handling), not(test)))]
 #[cold]
+#[optimize(size)]
 pub const fn handle_alloc_error(layout: Layout) -> ! {
     const fn ct_error(_: Layout) -> ! {
         panic!("allocation failed");