diff options
| author | Trevor Gross <tmgross@umich.edu> | 2023-09-11 00:59:31 -0400 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-08-06 23:59:47 +0000 |
| commit | 289fe36d373c5a13fa7f1b93f39ff88425ab2351 (patch) | |
| tree | 410435fc6fa49a1ffd25c9e52e579087ed639c5e /tests/ui/resolve | |
| parent | 0c8b3870bd9ec60093b478b318858fdb220846b7 (diff) | |
| download | rust-289fe36d373c5a13fa7f1b93f39ff88425ab2351.tar.gz rust-289fe36d373c5a13fa7f1b93f39ff88425ab2351.zip | |
Print thread ID in panic message if thread name is unknown
`panic!` does not print any identifying information for threads that are
unnamed. However, in many cases, the thread ID can be determined.
This changes the panic message from something like this:
thread '<unnamed>' panicked at src/main.rs:3:5:
explicit panic
To something like this:
thread '<unnamed>' (0xff9bf) panicked at src/main.rs:3:5:
explicit panic
Stack overflow messages are updated as well.
This change applies to both named and unnamed threads. The ID printed is
the OS integer thread ID rather than the Rust thread ID, which should
also be what debuggers print.
Diffstat (limited to 'tests/ui/resolve')
| -rw-r--r-- | tests/ui/resolve/multiple_definitions_attribute_merging.rs | 2 | ||||
| -rw-r--r-- | tests/ui/resolve/proc_macro_generated_packed.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/resolve/multiple_definitions_attribute_merging.rs b/tests/ui/resolve/multiple_definitions_attribute_merging.rs index 155abafdd9d..519b989fbe8 100644 --- a/tests/ui/resolve/multiple_definitions_attribute_merging.rs +++ b/tests/ui/resolve/multiple_definitions_attribute_merging.rs @@ -5,7 +5,7 @@ //@known-bug: #120873 //@ failure-status: 101 //@ normalize-stderr: "note: .*\n\n" -> "" -//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> "" //@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " //@ rustc-env:RUST_BACKTRACE=0 diff --git a/tests/ui/resolve/proc_macro_generated_packed.rs b/tests/ui/resolve/proc_macro_generated_packed.rs index 0cba3c1616d..41236c732bb 100644 --- a/tests/ui/resolve/proc_macro_generated_packed.rs +++ b/tests/ui/resolve/proc_macro_generated_packed.rs @@ -5,7 +5,7 @@ //@known-bug: #120873 //@ failure-status: 101 //@ normalize-stderr: "note: .*\n\n" -> "" -//@ normalize-stderr: "thread 'rustc' panicked.*\n" -> "" +//@ normalize-stderr: "thread 'rustc'.*panicked.*\n" -> "" //@ normalize-stderr: "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: " //@ rustc-env:RUST_BACKTRACE=0 |
