Skip to content

Conversation

@mattiapitossi
Copy link
Contributor

@mattiapitossi mattiapitossi commented Feb 6, 2026

Motivation

Currently, if you look at the Tokio docs the task module it's not under the rt feature flag:

image

But every public module and struct inside task is under rt feature flag (except for coop which is only available for the crate).

This also leads to confusion because items that have multiple feature flags don't display the rt flag:

image

Solution

The solution is to gate the task module under rt feature flag:

image image

Docs

rendered docs

}

cfg_not_rt! {
pub(crate) mod task;
Copy link
Contributor Author

@mattiapitossi mattiapitossi Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside the task module only crate coop is available under not_rt

@mattiapitossi mattiapitossi marked this pull request as ready for review February 6, 2026 16:52
@Darksonn Darksonn added T-docs Topic: documentation A-tokio Area: The main tokio crate M-task Module: tokio/task labels Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tokio Area: The main tokio crate M-task Module: tokio/task T-docs Topic: documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants