about summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/core/src/panicking.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/panicking.rs b/library/core/src/panicking.rs
index 281f8c1e166..e6cdffd96af 100644
--- a/library/core/src/panicking.rs
+++ b/library/core/src/panicking.rs
@@ -234,7 +234,8 @@ fn panic_in_cleanup() -> ! {
 #[rustc_const_unstable(feature = "core_panic", issue = "none")]
 pub const fn const_panic_fmt(fmt: fmt::Arguments<'_>) -> ! {
     if let Some(msg) = fmt.as_str() {
-        panic_str(msg);
+        // The panic_display function is hooked by const eval.
+        panic_display(&msg);
     } else {
         // SAFETY: This is only evaluated at compile time, which reliably
         // handles this UB (in case this branch turns out to be reachable