From 84880c4d8b361ce17fb2a5e32ab20ed49e518328 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Thu, 7 Nov 2019 23:10:55 +0100 Subject: [PATCH] re-export async-attributes (#238) * re-export async-attributes Signed-off-by: Yoshua Wuyts * doc order Signed-off-by: Yoshua Wuyts * rebase + rename feature to "attributes" Signed-off-by: Yoshua Wuyts * only expose test and main Signed-off-by: Yoshua Wuyts * async-attributes 1.1.0 Signed-off-by: Yoshua Wuyts --- Cargo.toml | 4 +++- src/lib.rs | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 9583cdee..54ab0f1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,10 +22,12 @@ rustdoc-args = ["--cfg", "feature=\"docs\""] [features] default = [] -docs = ["unstable"] +docs = ["unstable", "attributes"] unstable = ["broadcaster"] +attributes = ["async-attributes"] [dependencies] +async-attributes = { version = "1.1.0", optional = true } async-macros = "1.0.0" async-task = "1.0.0" broadcaster = { version = "0.2.6", optional = true, default-features = false, features = ["default-channels"] } diff --git a/src/lib.rs b/src/lib.rs index 4320089e..4863cbbc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -157,6 +157,19 @@ //! version = "0.99" //! features = ["unstable"] //! ``` +//! +//! Items marked with +//! attributes +//! are available only when the `attributes` Cargo feature is enabled: +//! +//! ```toml +//! [dependencies.async-std] +//! version = "0.99" +//! features = ["attributes"] +//! ``` #![cfg(feature = "default")] #![cfg_attr(feature = "docs", feature(doc_cfg))] @@ -170,6 +183,11 @@ #[macro_use] mod utils; +#[cfg(feature = "attributes")] +#[cfg_attr(feature = "docs", doc(cfg(attributes)))] +#[doc(inline)] +pub use async_attributes::{main, test}; + pub mod fs; pub mod future; pub mod io;