mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-08 13:02:50 +00:00
Call panic_display directly in const_panic_fmt.
This commit is contained in:
parent
0692db1a90
commit
0d07b4c2ce
@ -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 conost 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
|
||||
|
Loading…
Reference in New Issue
Block a user