diff --git a/tokio/src/lib.rs b/tokio/src/lib.rs index 9fd5f1013ac..d1e9ba093b7 100644 --- a/tokio/src/lib.rs +++ b/tokio/src/lib.rs @@ -549,6 +549,11 @@ cfg_not_sync! { mod sync; } +// Currently, task module does not expose any public API outside `rt` +// feature, so we mark it in the docs. This happens only to docs to +// avoid introducing breaking changes by restricting the visibility +// of the task module. +#[cfg_attr(docsrs, doc(cfg(feature = "rt")))] pub mod task; cfg_rt! { pub use task::spawn;