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.
This commit is contained in:
Eliza Weisman 2022-02-23 13:03:41 -08:00 committed by GitHub
parent 3f508d1622
commit 0b97567b49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>>,
}