diff --git a/futures/src/executor/async_std.rs b/futures/src/executor/async_std.rs index 27949e31..471be369 100644 --- a/futures/src/executor/async_std.rs +++ b/futures/src/executor/async_std.rs @@ -3,6 +3,7 @@ use crate::Executor; use futures::Future; /// An `async-std` runtime. +#[cfg_attr(docsrs, doc(cfg(feature = "async-std")))] #[derive(Debug)] pub struct AsyncStd; diff --git a/futures/src/executor/thread_pool.rs b/futures/src/executor/thread_pool.rs index 1ec5bf69..a6c6168e 100644 --- a/futures/src/executor/thread_pool.rs +++ b/futures/src/executor/thread_pool.rs @@ -3,6 +3,7 @@ use crate::Executor; use futures::Future; /// A thread pool runtime for futures. +#[cfg_attr(docsrs, doc(cfg(feature = "thread-pool")))] pub type ThreadPool = futures::executor::ThreadPool; impl Executor for futures::executor::ThreadPool { diff --git a/futures/src/executor/tokio.rs b/futures/src/executor/tokio.rs index 20802ceb..a730bce8 100644 --- a/futures/src/executor/tokio.rs +++ b/futures/src/executor/tokio.rs @@ -3,6 +3,7 @@ use crate::Executor; use futures::Future; /// A `tokio` runtime. +#[cfg_attr(docsrs, doc(cfg(feature = "tokio")))] pub type Tokio = tokio::runtime::Runtime; impl Executor for Tokio { diff --git a/futures/src/lib.rs b/futures/src/lib.rs index 79178931..966a9cdc 100644 --- a/futures/src/lib.rs +++ b/futures/src/lib.rs @@ -4,6 +4,8 @@ #![deny(unused_results)] #![forbid(unsafe_code)] #![forbid(rust_2018_idioms)] +#![cfg_attr(docsrs, feature(doc_cfg))] + pub use futures; mod command;