From 90091a0b2639a1038e53dbe16c75c4b70587076f Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Tue, 24 Sep 2019 14:15:43 +0200 Subject: [PATCH 1/5] re-export async-attributes Signed-off-by: Yoshua Wuyts --- Cargo.toml | 2 ++ src/lib.rs | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b117b113d..20c84d861 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,8 +24,10 @@ rustdoc-args = ["--cfg", "feature=\"docs\""] default = [] docs = ["unstable"] unstable = ["broadcaster"] +bin = ["async-attributes"] [dependencies] +async-attributes = { version = "1.0.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 ea05edf73..1fbd0e693 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,13 +32,17 @@ //! unstable -//! are available only when the `unstable` Cargo feature is enabled: +//! >unstable or +//! bin +//! are available only when the corresponding Cargo features are enabled: //! //! ```toml //! [dependencies.async-std] //! version = "0.99" -//! features = ["unstable"] +//! features = ["unstable", "bin"] //! ``` #![cfg(feature = "default")] @@ -53,6 +57,11 @@ #[macro_use] mod utils; +#[cfg_attr(feature = "docs", doc(cfg(bin)))] +#[cfg(feature = "bin")] +#[doc(inline)] +pub use async_attributes::*; + pub mod fs; pub mod future; pub mod io; From d968a34ea1730548a84b5b7d21dac9a98c178272 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Tue, 24 Sep 2019 14:33:29 +0200 Subject: [PATCH 2/5] doc order Signed-off-by: Yoshua Wuyts --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1fbd0e693..981766cbb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,17 +32,17 @@ //! unstable or +//! >bin or //! bin +//! >unstable //! are available only when the corresponding Cargo features are enabled: //! //! ```toml //! [dependencies.async-std] //! version = "0.99" -//! features = ["unstable", "bin"] +//! features = ["bin", "unstable"] //! ``` #![cfg(feature = "default")] From 038edc0e395ceb3ca3766e978c6cc711a9224a95 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Sun, 3 Nov 2019 00:13:44 +0100 Subject: [PATCH 3/5] rebase + rename feature to "attributes" Signed-off-by: Yoshua Wuyts --- Cargo.toml | 4 ++-- src/lib.rs | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 20c84d861..72628f493 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,9 +22,9 @@ rustdoc-args = ["--cfg", "feature=\"docs\""] [features] default = [] -docs = ["unstable"] +docs = ["unstable", "attributes"] unstable = ["broadcaster"] -bin = ["async-attributes"] +attributes = ["async-attributes"] [dependencies] async-attributes = { version = "1.0.0", optional = true } diff --git a/src/lib.rs b/src/lib.rs index 981766cbb..35bdfcf77 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,17 +32,26 @@ //! bin or +//! >unstable +//! are available only when the `unstable` Cargo feature is enabled: +//! +//! ```toml +//! [dependencies.async-std] +//! version = "0.99" +//! features = ["unstable"] +//! ``` +//! +//! Items marked with //! unstable -//! are available only when the corresponding Cargo features are enabled: +//! >attributes +//! are available only when the `attributes` Cargo feature is enabled: //! //! ```toml //! [dependencies.async-std] //! version = "0.99" -//! features = ["bin", "unstable"] +//! features = ["attributes"] //! ``` #![cfg(feature = "default")] @@ -57,8 +66,8 @@ #[macro_use] mod utils; -#[cfg_attr(feature = "docs", doc(cfg(bin)))] -#[cfg(feature = "bin")] +#[cfg(feature = "attributes")] +#[cfg_attr(feature = "docs", doc(cfg(attributes)))] #[doc(inline)] pub use async_attributes::*; From 979feec05c8f3bc2c922dc37adde801228ad5a11 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Sun, 3 Nov 2019 00:42:24 +0100 Subject: [PATCH 4/5] only expose test and main Signed-off-by: Yoshua Wuyts --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 35bdfcf77..fa7a07206 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -69,7 +69,7 @@ mod utils; #[cfg(feature = "attributes")] #[cfg_attr(feature = "docs", doc(cfg(attributes)))] #[doc(inline)] -pub use async_attributes::*; +pub use async_attributes::{main, test}; pub mod fs; pub mod future; From 40eb33dd81617d23a7233aeece86bc254a3008d7 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Sun, 3 Nov 2019 00:45:05 +0100 Subject: [PATCH 5/5] async-attributes 1.1.0 Signed-off-by: Yoshua Wuyts --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 72628f493..55268f64f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ unstable = ["broadcaster"] attributes = ["async-attributes"] [dependencies] -async-attributes = { version = "1.0.0", optional = true } +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"] }