about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-11-19 04:01:30 +0100
committerGitHub <noreply@github.com>2024-11-19 04:01:30 +0100
commit17ffefcf0001e9dafee486b453c0761a02a48ccd (patch)
tree84284bf244f3261a9d15d66a1831a5c47edd3ed9
parent09838ae70d663d65d0e35d2e124096eb02c84ddf (diff)
parent31f5c3ba69f68c911773e2f126e98994c60bf58e (diff)
downloadrust-17ffefcf0001e9dafee486b453c0761a02a48ccd.tar.gz
rust-17ffefcf0001e9dafee486b453c0761a02a48ccd.zip
Rollup merge of #133182 - RalfJung:const-panic-inline, r=tgross35
const_panic: inline in bootstrap builds to avoid f16/f128 crashes

This should fix https://github.com/rust-lang/rust/issues/133177. ``@uweigand`` could you test that?
-rw-r--r--library/core/src/panic.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/panic.rs b/library/core/src/panic.rs
index e702056f00a..179aadf0c28 100644
--- a/library/core/src/panic.rs
+++ b/library/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)
                 }
             )