about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-10-03 03:31:47 +0000
committerbors <bors@rust-lang.org>2024-10-03 03:31:47 +0000
commitfd1f8aa05d690138815fefb0066543a9087889bb (patch)
treeef4983512a16ff3a3bf57fb32c666a8c83c0d05e /compiler/rustc_parse/src/errors.rs
parentad9c494835e746fb7c8a26eeed0ad90e4e834058 (diff)
parenta71ba0cf02cdd196b9c88fd1087ccdf7048c4c21 (diff)
downloadrust-fd1f8aa05d690138815fefb0066543a9087889bb.tar.gz
rust-fd1f8aa05d690138815fefb0066543a9087889bb.zip
Auto merge of #127912 - joboet:tls_dtor_thread_current, r=cuviper
std: make `thread::current` available in all `thread_local!` destructors

... and thereby allow the panic runtime to always print the right thread name.

This works by modifying the TLS destructor system to schedule a runtime cleanup function after all other TLS destructors registered by `std` have run. Unfortunately, this doesn't affect foreign TLS destructors, `thread::current` will still panic there.

Additionally, the thread ID returned by `current_id` will now always be available, even inside the global allocator, and will not change during the lifetime of one thread (this was previously the case with key-based TLS).

The mechanisms I added for this (`local_pointer` and `thread_cleanup`) will also allow finally fixing #111272 by moving the signal stack to a similar runtime-cleanup TLS variable.
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions