about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-03-23 09:40:16 +0100
committerRalf Jung <post@ralfj.de>2024-03-23 09:44:04 +0100
commitfc257fae3c6d4adc6effb2535fb9130d8c15e3ff (patch)
treeb732ade18a72213fd5cfbbc6898f5ea168a3a768 /library/std/src
parente3df96cfda905301fc8514e000f942222c1ab6ad (diff)
downloadrust-fc257fae3c6d4adc6effb2535fb9130d8c15e3ff.tar.gz
rust-fc257fae3c6d4adc6effb2535fb9130d8c15e3ff.zip
add panic location to 'panicked while processing panic'
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/panicking.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/library/std/src/panicking.rs b/library/std/src/panicking.rs
index 464a46264cb..6121eaf86ce 100644
--- a/library/std/src/panicking.rs
+++ b/library/std/src/panicking.rs
@@ -746,7 +746,13 @@ fn rust_panic_with_hook(
             panic_count::MustAbort::PanicInHook => {
                 // Don't try to print the message in this case
                 // - perhaps that is causing the recursive panics.
-                rtprintpanic!("thread panicked while processing panic. aborting.\n");
+                let panicinfo = PanicInfo::internal_constructor(
+                    None,     // no message
+                    location, // but we want to show the location!
+                    can_unwind,
+                    force_no_backtrace,
+                );
+                rtprintpanic!("{panicinfo}\nthread panicked while processing panic. aborting.\n");
             }
             panic_count::MustAbort::AlwaysAbort => {
                 // Unfortunately, this does not print a backtrace, because creating