rust/tests/rustdoc-ui/doctest
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
..
auxiliary rustdoc: Fix doctest heuristic for main fn wrapping 2025-05-01 11:56:11 +02:00
block-doc-comment.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
block-doc-comment.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
cfg-test.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
cfg-test.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
check-attr-test.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
check-attr-test.stderr Improve mistyped docblock attribute warning messages 2024-09-28 18:38:11 +02:00
check-cfg-test.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
check-cfg-test.stderr Move --check-cfg documentation to stable books 2024-04-15 21:49:56 +02:00
check-cfg-test.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
comment-in-attr-134221-2.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
comment-in-attr-134221-2.stdout Remove unneeded handling of backlines in doctest attributes 2024-12-16 17:59:07 +01:00
comment-in-attr-134221.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
comment-in-attr-134221.stdout Also handle cases where attributes are unclosed 2024-12-16 13:59:41 +01:00
dead-code-2024.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
dead-code-2024.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
dead-code-items.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
dead-code-items.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
dead-code-module-2.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
dead-code-module-2.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
dead-code-module.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
dead-code-module.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
dead-code.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
dead-code.stdout Add regression tests for #130681 2024-10-01 17:08:01 +02:00
display-output.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
display-output.stdout Correctly handle line comments in attributes and generate extern crates 2025-03-27 11:18:43 +01:00
doc-comment-multi-line-attr.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
doc-comment-multi-line-attr.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
doc-comment-multi-line-cfg-attr.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
doc-comment-multi-line-cfg-attr.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
doc-test-attr-pass-module.rs Collect and use #![doc(test(attr(..)))] at module level too 2025-05-22 20:10:32 +02:00
doc-test-attr-pass.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
doc-test-attr.rs Update ui tests 2024-02-29 14:43:43 +01:00
doc-test-attr.stderr Update ui tests 2024-02-29 14:43:43 +01:00
doc-test-doctest-feature.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
doc-test-doctest-feature.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
doc-test-rustdoc-feature.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
doc-test-rustdoc-feature.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
doctest-edition.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
doctest-edition.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
doctest-multiline-crate-attribute.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
doctest-multiline-crate-attribute.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
doctest-no-run-invalid-langstring-124577.rs rustdoc: Fix flaky doctest test 2025-01-19 18:41:11 +01:00
doctest-no-run-invalid-langstring-124577.stdout rustdoc: Fix flaky doctest test 2025-01-19 18:41:11 +01:00
doctest-output-include-fail.md rustdoc: use the correct span for doctests 2024-09-19 13:57:44 -07:00
doctest-output-include-fail.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
doctest-output-include-fail.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
doctest-output.edition2015.stdout rustdoc: make doctest span tweak a 2024 edition change 2024-10-26 17:56:38 -07:00
doctest-output.edition2024.stdout rustdoc: make doctest span tweak a 2024 edition change 2024-10-26 17:56:38 -07:00
doctest-output.rs doctests: build test bundle and harness separately 2025-03-10 01:47:36 +01:00
edition-2024-error-output.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
edition-2024-error-output.stdout Print thread ID in panic message if thread name is unknown 2025-08-06 23:59:47 +00:00
extern-crate.rs Correctly handle line comments in attributes and generate extern crates 2025-03-27 11:18:43 +01:00
extern-crate.stdout Correctly handle line comments in attributes and generate extern crates 2025-03-27 11:18:43 +01:00
failed-doctest-compile-fail.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
failed-doctest-compile-fail.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
failed-doctest-extra-semicolon-on-item.rs If there is a ; alone, we consider that the doctest needs to be put inside a function 2025-04-25 22:04:50 +02:00
failed-doctest-extra-semicolon-on-item.stderr Emit a warning if the doctest main function will not be run 2025-05-02 13:57:53 +02:00
failed-doctest-extra-semicolon-on-item.stdout If there is a ; alone, we consider that the doctest needs to be put inside a function 2025-04-25 22:04:50 +02:00
failed-doctest-missing-codes.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
failed-doctest-missing-codes.stdout Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
failed-doctest-output-windows.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
failed-doctest-output-windows.stdout Print thread ID in panic message if thread name is unknown 2025-08-06 23:59:47 +00:00
failed-doctest-output.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
failed-doctest-output.stdout Print thread ID in panic message if thread name is unknown 2025-08-06 23:59:47 +00:00
failed-doctest-should-panic-2021.rs replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00
failed-doctest-should-panic-2021.stdout replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00
failed-doctest-should-panic.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
failed-doctest-should-panic.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
failed-doctest-test-crate.edition2015.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
failed-doctest-test-crate.edition2024.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
failed-doctest-test-crate.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
main-alongside-macro-calls.fail.stdout rustdoc: Fix doctest heuristic for main fn wrapping 2025-05-01 11:56:11 +02:00
main-alongside-macro-calls.pass.stdout rustdoc: Fix doctest heuristic for main fn wrapping 2025-05-01 11:56:11 +02:00
main-alongside-macro-calls.rs rustdoc: Fix doctest heuristic for main fn wrapping 2025-05-01 11:56:11 +02:00
main-alongside-stmts.rs rustdoc: Fix doctest heuristic for main fn wrapping 2025-05-01 11:56:11 +02:00
main-alongside-stmts.stderr Emit a warning if the doctest main function will not be run 2025-05-02 13:57:53 +02:00
main-alongside-stmts.stdout rustdoc: Fix doctest heuristic for main fn wrapping 2025-05-01 11:56:11 +02:00
merged-ignore-no_run.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
merged-ignore-no_run.stdout Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
nested-main.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
nested-main.stdout Add regression test for #131893 2024-10-24 21:35:15 +02:00
no-run-flag-error.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
no-run-flag-error.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
no-run-flag.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
no-run-flag.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
nocapture-fail.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
nocapture-fail.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
nocapture-fail.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
nocapture.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
nocapture.stderr Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
nocapture.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
non-local-defs-impl.rs chore: fix some typos 2024-12-31 15:11:18 +08:00
non-local-defs-impl.stdout Remove deprecation note in the non_local_definitions warning 2024-10-11 21:21:32 +02:00
non_local_defs.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
non_local_defs.stderr Remove deprecation note in the non_local_definitions warning 2024-10-11 21:21:32 +02:00
non_local_defs.stdout Revert "Switch back non_local_definitions lint to allow-by-default" 2024-09-23 09:23:04 +02:00
per-target-ignores.rs ignore doctests only in specified targets 2025-03-25 15:39:41 +09:00
per-target-ignores.stdout ignore doctests only in specified targets 2025-03-25 15:39:41 +09:00
private-doc-test.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
private-item-doc-test.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
private-item-doc-test.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
private-public-item-doc-test.rs Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
private-public-item-doc-test.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
public-reexported-item-doc-test.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
relative-path-include-bytes-132203.edition2015.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
relative-path-include-bytes-132203.edition2024.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
relative-path-include-bytes-132203.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
run-directory.correct.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
run-directory.incorrect.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
run-directory.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
rustflags-multiple-args.rs Replace flag --doctest-compilation-args with a simpler one: --doctest-build-arg 2025-04-15 15:44:45 +02:00
rustflags-multiple-args.stdout Replace flag --doctest-compilation-args with a simpler one: --doctest-build-arg 2025-04-15 15:44:45 +02:00
rustflags.rs Replace flag --doctest-compilation-args with a simpler one: --doctest-build-arg 2025-04-15 15:44:45 +02:00
rustflags.stdout Add regression test for --doctest-compilation-args 2024-12-20 15:17:47 +01:00
standalone-warning-2024.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
standalone-warning-2024.stderr feat: Right align line numbers 2025-07-28 16:32:11 -06:00
standalone-warning.rs Rename doctest attribute standalone-crate into standalone_crate for coherency 2024-09-29 13:01:41 +02:00
stdout-and-stderr.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
stdout-and-stderr.stdout Print thread ID in panic message if thread name is unknown 2025-08-06 23:59:47 +00:00
test-compile-fail1.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
test-compile-fail1.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
test-compile-fail2.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
test-compile-fail2.stderr Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
test-compile-fail3.rs [AUTO_GENERATED] Migrate compiletest to use ui_test-style //@ directives 2024-02-22 16:04:04 +00:00
test-compile-fail3.stderr Be more accurate about calculating display_col from a BytePos 2024-07-18 20:08:38 +00:00
test-main-alongside-exprs.stderr Emit a warning if the doctest main function will not be run 2025-05-02 13:57:53 +02:00
test-no_std.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
test-no_std.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
test-type.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
test-type.stdout Move some rustdoc-ui tests to subdirectories 2023-04-29 11:36:19 -05:00
unparseable-doc-test.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
unparseable-doc-test.stdout Bless rustdoc-ui tests 2023-11-24 19:15:52 +01:00
warn-main-not-called.rs Add regression test for #140310 2025-05-02 13:57:53 +02:00
warn-main-not-called.stderr Add regression test for #140310 2025-05-02 13:57:53 +02:00
warn-main-not-called.stdout Add regression test for #140310 2025-05-02 13:57:53 +02:00
wrong-ast-2024.rs Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
wrong-ast-2024.stdout Update rustdoc ui tests 2025-07-24 11:06:28 +02:00
wrong-ast.rs Remove the -test suffix from normalize directives 2024-12-27 19:58:16 +11:00
wrong-ast.stdout Don't special-case if there is only one merged doctest 2024-08-13 20:14:56 +02:00