Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite join! and try_join! as procedural macros #1783

Merged
merged 1 commit into from Aug 8, 2019

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Aug 6, 2019

Closes #1782

r? @cramertj

@@ -27,13 +27,15 @@ cfg-target-has-atomic = ["futures-core-preview/cfg-target-has-atomic"]
sink = ["futures-sink-preview"]
io = ["std", "futures-io-preview", "memchr"]
channel = ["std", "futures-channel-preview"]
join-macro = ["async-await", "futures-join-macro-preview", "proc-macro-hack", "proc-macro-nested"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For almost the same reason as select!, this is optional in futures_util (see #1701).

@cramertj
Copy link
Member

cramertj commented Aug 6, 2019

Wow, this is awesome! I have so much appreciation for your eagerness and quick work on all of this. Thanks, @taiki-e!

/// `join!` polls both futures concurrently and therefore is more efficent.
///
/// This macro is only usable inside of async functions, closures, and blocks.
/// It is also gated behind the `async-await` feature of this library, which is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// It is also gated behind the `async-await` feature of this library, which is
/// It is also gated behind the `join-macro` feature of this library, which is

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it depends on what "this library" is referring to...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. So, I would like to remove these descriptions and change them to use doc(cfg(feature = "..")) instead in the near future.

@cramertj cramertj merged commit 049922d into rust-lang:master Aug 8, 2019
@taiki-e taiki-e deleted the join-proc-macro branch August 8, 2019 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite join! and try_join! macros as procedural macros
3 participants