Skip to content

Commit dccc58a

Browse files
authored
task: add missing feature flags for task_local (#3236)
1 parent 95b9435 commit dccc58a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tokio/src/task/task_local.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use std::{fmt, thread};
3131
///
3232
/// [`tokio::task::LocalKey`]: struct@crate::task::LocalKey
3333
#[macro_export]
34+
#[cfg_attr(docsrs, doc(cfg(all(feature = "rt-util", feature = "rt-core"))))]
3435
macro_rules! task_local {
3536
// empty (base case for the recursion)
3637
() => {};
@@ -90,6 +91,7 @@ macro_rules! __task_local_inner {
9091
/// # }
9192
/// ```
9293
/// [`std::thread::LocalKey`]: struct@std::thread::LocalKey
94+
#[cfg_attr(docsrs, doc(cfg(all(feature = "rt-util", feature = "rt-core"))))]
9395
pub struct LocalKey<T: 'static> {
9496
#[doc(hidden)]
9597
pub inner: thread::LocalKey<RefCell<Option<T>>>,

0 commit comments

Comments
 (0)