diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-10-02 10:27:48 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-02 10:27:48 +0200 | 
| commit | 92aac1bdf61642cfc99498ca86e663cf53d2039e (patch) | |
| tree | 20241a81c901b8835022b90eddaed6b375e23f30 /library/std/src/thread/mod.rs | |
| parent | 42b384ec0dfcd528d99a4db0a337d9188a9eecaa (diff) | |
| parent | 94f00f4e4a0240bc7b8284c78482e37af252309a (diff) | |
| download | rust-92aac1bdf61642cfc99498ca86e663cf53d2039e.tar.gz rust-92aac1bdf61642cfc99498ca86e663cf53d2039e.zip | |
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
Diffstat (limited to 'library/std/src/thread/mod.rs')
| -rw-r--r-- | library/std/src/thread/mod.rs | 1 | 
1 files changed, 1 insertions, 0 deletions
| diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 1768369792a..fd7cce3f97d 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -207,6 +207,7 @@ pub use self::local::{AccessError, LocalKey}; #[doc(hidden)] #[unstable(feature = "thread_local_internals", issue = "none")] pub mod local_impl { + pub use super::local::thread_local_process_attrs; pub use crate::sys::thread_local::*; } | 
