We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e3fbd3c + 936349c commit f573bd8Copy full SHA for f573bd8
src/libstd/thread/local.rs
@@ -149,7 +149,7 @@ macro_rules! thread_local {
149
#[allow_internal_unstable(thread_local_internals, cfg_target_thread_local, thread_local)]
150
#[allow_internal_unsafe]
151
macro_rules! __thread_local_inner {
152
- (@key $(#[$attr:meta])* $vis:vis $name:ident, $t:ty, $init:expr) => {
+ (@key $t:ty, $init:expr) => {
153
{
154
#[inline]
155
fn __init() -> $t { $init }
@@ -184,7 +184,7 @@ macro_rules! __thread_local_inner {
184
};
185
($(#[$attr:meta])* $vis:vis $name:ident, $t:ty, $init:expr) => {
186
$(#[$attr])* $vis const $name: $crate::thread::LocalKey<$t> =
187
- $crate::__thread_local_inner!(@key $(#[$attr])* $vis $name, $t, $init);
+ $crate::__thread_local_inner!(@key $t, $init);
188
}
189
190
0 commit comments