Skip to content

Commit

Permalink
task: add missing feature flags for task_local (#3236)
Browse files Browse the repository at this point in the history
  • Loading branch information
nylonicious authored Dec 10, 2020
1 parent 95b9435 commit dccc58a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tokio/src/task/task_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
() => {};
Expand Down Expand Up @@ -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<T: 'static> {
#[doc(hidden)]
pub inner: thread::LocalKey<RefCell<Option<T>>>,
Expand Down

0 comments on commit dccc58a

Please sign in to comment.