From e84f865601db9817a99e2476856283a8a40e0c78 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 18 Nov 2024 18:17:02 +0100 Subject: [PATCH] const_panic: inline in bootstrap builds to avoid f16/f128 crashes --- core/src/panic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/panic.rs b/core/src/panic.rs index e702056f00ab4..179aadf0c286c 100644 --- a/core/src/panic.rs +++ b/core/src/panic.rs @@ -215,7 +215,7 @@ pub macro const_panic { #[noinline] if const #[track_caller] #[inline] { // Inline this, to prevent codegen $crate::panic!($const_msg) - } else #[track_caller] { // Do not inline this, it makes perf worse + } else #[track_caller] #[cfg_attr(bootstrap, inline)] { // Do not inline this, it makes perf worse $crate::panic!($runtime_msg) } )