rust/library/std
Trevor Gross ca3c822068
Rollup merge of #131233 - joboet:stdout-before-main, r=tgross35
std: fix stdout-before-main

Fixes #130210.

Since #124881, `ReentrantLock` uses `ThreadId` to identify threads. This has the unfortunate consequence of breaking uses of `Stdout` before main: Locking the `ReentrantLock` that synchronizes the output will initialize the thread ID before the handle for the main thread is set in `rt::init`. But since that would overwrite the current thread ID, `thread::set_current` triggers an abort.

This PR fixes the problem by using the already initialized thread ID for constructing the main thread handle and allowing `set_current` calls that do not change the thread's ID.
2024-10-12 11:08:43 -05:00
..
benches Reformat use declarations. 2024-07-29 08:26:52 +10:00
src Rollup merge of #131233 - joboet:stdout-before-main, r=tgross35 2024-10-12 11:08:43 -05:00
tests rustc_target: Add sme-b16b16 as an explicit aarch64 target feature 2024-10-10 10:24:57 +00:00
build.rs enable f16 and f128 on windows-gnullvm targets 2024-10-05 23:55:39 +02:00
Cargo.toml Update compiler-builtins to 0.1.133 2024-10-05 21:34:51 -05:00