diff --git a/tokio/src/task/task_local.rs b/tokio/src/task/task_local.rs index 1679ee3ba12..d161f2014fc 100644 --- a/tokio/src/task/task_local.rs +++ b/tokio/src/task/task_local.rs @@ -31,6 +31,7 @@ use std::{fmt, thread}; /// /// [`tokio::task::LocalKey`]: struct@crate::task::LocalKey #[macro_export] +#[cfg_attr(docsrs, doc(cfg(all(feature = "rt-util", feature = "rt-core"))))] macro_rules! task_local { // empty (base case for the recursion) () => {}; @@ -90,6 +91,7 @@ macro_rules! __task_local_inner { /// # } /// ``` /// [`std::thread::LocalKey`]: struct@std::thread::LocalKey +#[cfg_attr(docsrs, doc(cfg(all(feature = "rt-util", feature = "rt-core"))))] pub struct LocalKey { #[doc(hidden)] pub inner: thread::LocalKey>>,