From 0b97567b498855aafbd583af00c94aea24fd9fda Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Wed, 23 Feb 2022 13:03:41 -0800 Subject: [PATCH] task: fix missing doc(cfg(...)) attributes for `JoinSet` (#4531) ## Motivation The `JoinSet` type is currently missing the `tokio_unstable` and `feature = "rt"` `doc(cfg(...))` attributes, making it erroneously appear to be available without the required feature and without unstable features enabled. This is incorrect. I believe this is because `doc(cfg(...))` on a re-export doesn't actually add the required cfgs to the type itself, and the `cfg_unstable!` is currently only guarding a re-export and module. ## Solution This PR fixes the missing attributes. --- tokio/src/task/join_set.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/tokio/src/task/join_set.rs b/tokio/src/task/join_set.rs index 8e8f74f66d1..a2f848391e1 100644 --- a/tokio/src/task/join_set.rs +++ b/tokio/src/task/join_set.rs @@ -48,6 +48,7 @@ use crate::util::IdleNotifiedSet; /// ``` /// /// [unstable]: crate#unstable-features +#[cfg_attr(docsrs, doc(cfg(all(feature = "rt", tokio_unstable))))] pub struct JoinSet { inner: IdleNotifiedSet>, }