Skip to content

Commit c3d3021

Browse files
committed
Call panic_display directly in const_panic_fmt.
1 parent 0c1379e commit c3d3021

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/panicking.rs

Lines changed: 2 additions & 1 deletion
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)