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/const-generics/generic_const_exprs | |
| 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/const-generics/generic_const_exprs')
| -rw-r--r-- | tests/ui/const-generics/generic_const_exprs/issue-80742.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs index 73357d208c0..ac4d9fc0f4f 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs +++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs @@ -2,7 +2,7 @@ //@ known-bug: #97477 //@ 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 |
