rust/tests/ui/test-attrs/test-panic-abort.run.stdout
Trevor Gross 289fe36d37 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.
2025-08-06 23:59:47 +00:00

34 lines
705 B
Plaintext

running 6 tests
test benchmark ... ok
test it_exits ... FAILED
test it_fails ... FAILED
test it_panics - should panic ... ok
test it_works ... ok
test no_residual_environment ... ok
failures:
---- it_exits stdout ----
---- it_exits stderr ----
note: got unexpected return code 123
---- it_fails stdout ----
hello, world
testing123
---- it_fails stderr ----
testing321
thread 'main' ($TID) panicked at $DIR/test-panic-abort.rs:37:5:
assertion `left == right` failed
left: 2
right: 5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
it_exits
it_fails
test result: FAILED. 4 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME