Skip to content

Commit 31f5c3b

Browse files
committedNov 18, 2024·
const_panic: inline in bootstrap builds to avoid f16/f128 crashes
1 parent c602e9a commit 31f5c3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎library/core/src/panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ pub macro const_panic {
215215
#[noinline]
216216
if const #[track_caller] #[inline] { // Inline this, to prevent codegen
217217
$crate::panic!($const_msg)
218-
} else #[track_caller] { // Do not inline this, it makes perf worse
218+
} else #[track_caller] #[cfg_attr(bootstrap, inline)] { // Do not inline this, it makes perf worse
219219
$crate::panic!($runtime_msg)
220220
}
221221
)

0 commit comments

Comments
 (0)
Please sign in to comment.