macros: correctly feature gate join/try_join (#2196)

The `macros` feature flag was ommitted despite the fact that these
macros require the feature flag to function. The macros are now scoped
by the `macros` feature flag.

This is *not* a breaking change due to the fact that the macros were
broken without the `macros` feature flag in the first place.
This commit is contained in:
Carl Lerche
2020-01-29 11:16:58 -08:00
committed by GitHub
parent be832f20cb
commit 6232c74724
4 changed files with 13 additions and 10 deletions
+1
View File
@@ -53,6 +53,7 @@
/// }
/// ```
#[macro_export]
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
macro_rules! join {
(@ {
// One `_` for each branch in the `join!` macro. This is not used once
+10 -10
View File
@@ -7,9 +7,6 @@ mod assert;
#[macro_use]
mod cfg;
#[macro_use]
mod join;
#[macro_use]
mod loom;
@@ -19,16 +16,19 @@ mod pin;
#[macro_use]
mod ready;
cfg_macros! {
#[macro_use]
mod select;
}
#[macro_use]
mod thread_local;
#[macro_use]
mod try_join;
cfg_macros! {
#[macro_use]
mod select;
#[macro_use]
mod join;
#[macro_use]
mod try_join;
}
// Includes re-exports needed to implement macros
#[doc(hidden)]
+1
View File
@@ -281,6 +281,7 @@
/// }
/// ```
#[macro_export]
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
macro_rules! select {
// Uses a declarative macro to do **most** of the work. While it is possible
// to implement fully with a declarative macro, a procedural macro is used
+1
View File
@@ -60,6 +60,7 @@
/// }
/// ```
#[macro_export]
#[cfg_attr(docsrs, doc(cfg(feature = "macros")))]
macro_rules! try_join {
(@ {
// One `_` for each branch in the `try_join!` macro. This is not used once