mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
task: Ensure the visibility modifier is propagated when constructing a task local (#2416)
This commit is contained in:
@@ -49,7 +49,7 @@ macro_rules! task_local {
|
||||
#[macro_export]
|
||||
macro_rules! __task_local_inner {
|
||||
($(#[$attr:meta])* $vis:vis $name:ident, $t:ty) => {
|
||||
static $name: $crate::task::LocalKey<$t> = {
|
||||
$vis static $name: $crate::task::LocalKey<$t> = {
|
||||
std::thread_local! {
|
||||
static __KEY: std::cell::RefCell<Option<$t>> = std::cell::RefCell::new(None);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user