Skip to content

Commit 0d07b4c

Browse files
committed
Call panic_display directly in const_panic_fmt.
1 parent 0692db1 commit 0d07b4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/panicking.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ fn panic_in_cleanup() -> ! {
234234
#[rustc_const_unstable(feature = "core_panic", issue = "none")]
235235
pub const fn const_panic_fmt(fmt: fmt::Arguments<'_>) -> ! {
236236
if let Some(msg) = fmt.as_str() {
237-
panic_str(msg);
237+
// The panic_display function is hooked by conost eval.
238+
panic_display(&msg);
238239
} else {
239240
// SAFETY: This is only evaluated at compile time, which reliably
240241
// handles this UB (in case this branch turns out to be reachable

0 commit comments

Comments
 (0)