Skip to content

Commit ebf865b

Browse files
committed
Add #[inline] to the runtime const_panic path
1 parent a2c9de4 commit ebf865b

2 files changed

Lines changed: 1 addition & 19 deletions

File tree

library/core/src/panic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pub macro const_panic {
169169
#[noinline]
170170
if const #[track_caller] #[inline] { // Inline this, to prevent codegen
171171
$crate::panic!($const_msg)
172-
} else #[track_caller] { // Do not inline this, it makes perf worse
172+
} else #[track_caller] #[inline] {
173173
$crate::panic!($runtime_msg)
174174
}
175175
)

tests/codegen-llvm/intrinsics/likely_const_assert.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)