rust/library/std/src/sys
bors cb9aa8c9c1 Auto merge of #110861 - m-ou-se:thread-local-restructure, r=workingjubilee
Restructure and rename std thread_local internals to make it less of a maze

Every time I try to work on std's thread local internals, it feels like I'm trying to navigate a confusing maze made of macros, deeply nested modules, and types with multiple names/aliases. Time to clean it up a bit.

This PR:

- Exports `Key` with its own name (`Key`), instead of `__LocalKeyInner`
- Uses `pub macro` to put `__thread_local_inner` into a (unstable, hidden) module, removing `#[macro_export]`, removing it from the crate root.
- Removes the `__` from `__thread_local_inner`.
- Removes a few unnecessary `allow_internal_unstable` features from the macros
- Removes the `libstd_thread_internals` feature. (Merged with `thread_local_internals`.)
    - And removes it from the unstable book
- Gets rid of the deeply nested modules for the `Key` definitions (`mod fast` / `mod os` / `mod statik`).
- Turns a `#[cfg]` mess into a single `cfg_if`, now that there's no `#[macro_export]` anymore that breaks with `cfg_if`.
- Simplifies the `cfg_if` conditions to not repeat the conditions.
- Removes useless `normalize-stderr-test`, which were left over from when the `Key` types had different names on different platforms.
- Removes a seemingly unnecessary `realstd` re-export on `cfg(test)`.

This PR changes nothing about the thread local implementation. That's for a later PR. (Which should hopefully be easier once all this stuff is a bit cleaned up.)
2023-04-26 22:07:17 +00:00
..
common Restructure and rename thread local things in std. 2023-04-26 21:02:29 +02:00
hermit Rollup merge of #109722 - hermitcore:read, r=Mark-Simulacrum 2023-04-03 08:58:53 +02:00
itron Match unmatched backticks in library/ 2023-03-03 03:03:29 +01:00
sgx Spelling library/ 2023-04-26 02:10:22 -04:00
solid kmc-solid: Implement Socket::read_buf 2023-04-11 12:00:36 +09:00
unix Spelling library/ 2023-04-26 02:10:22 -04:00
unsupported More mem::take in library 2023-04-20 19:54:46 -07:00
wasi Fix std compilation error for wasi+atomics 2023-04-20 10:19:42 +02:00
wasm std: use a more efficient Once on platforms without threads 2022-12-14 13:55:30 +01:00
windows Windows: map a few more error codes to ErrorKind 2023-04-16 23:42:59 +01:00
mod.rs review 2023-03-17 21:00:10 -07:00