rust/library/std/src/thread
Matthias Krüger 92aac1bdf6
Rollup merge of #146281 - Jules-Bertholet:static-align-thread-local, r=Mark-Simulacrum
Support `#[rustc_align_static]` inside `thread_local!`

Tracking issue: rust-lang/rust#146177

```rust
thread_local! {
    #[rustc_align_static(64)]
    static SO_ALIGNED: u64 = const { 0 };
}
```

This increases the amount of recursion the macro performs (once per attribute in addition to the previous once per item), making it easier to hit the recursion limit. I’ve added workarounds to limit the impact in the case of long doc comments, but this still needs a crater run just in case.

r? libs

``@rustbot`` label A-attributes A-macros A-thread-locals F-static_align T-libs
2025-10-02 10:27:48 +02:00
..
current.rs Add fast-path for accessing the current thread id 2025-09-30 20:51:03 +02:00
local.rs Hoist non-platform-specific code out of thread_local_inner! 2025-09-27 17:05:39 -04:00
mod.rs Rollup merge of #146281 - Jules-Bertholet:static-align-thread-local, r=Mark-Simulacrum 2025-10-02 10:27:48 +02:00
scoped.rs use generic Atomic type where possible 2025-04-27 02:18:08 +03:00
spawnhook.rs setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
tests.rs thread parking: fix docs and examples 2025-09-03 09:14:25 +02:00