task: Ensure the visibility modifier is propagated when constructing a task local (#2416)

This commit is contained in:
Gardner Vickers
2020-04-20 12:40:14 -04:00
committed by GitHub
parent 8f3a265972
commit 6edc64afc7
+1 -1
View File
@@ -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);
}