Skip to content

Commit

Permalink
task: fix missing doc(cfg(...)) attributes for JoinSet (#4531)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
hawkw authored Feb 23, 2022
1 parent 3f508d1 commit 0b97567
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tokio/src/task/join_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> {
inner: IdleNotifiedSet<JoinHandle<T>>,
}
Expand Down

0 comments on commit 0b97567

Please sign in to comment.