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?
This commit is contained in:
León Orell Valerian Liehr 2024-11-19 04:01:30 +01:00 committed by GitHub
commit 17ffefcf00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)
}
)