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

Procedural macros provided by futures-async-stream cannot handle expressions in macros #4

Open
taiki-e opened this issue Aug 2, 2019 · 1 comment
Labels
C-bug Category: related to a bug.

Comments

@taiki-e
Copy link
Owner

taiki-e commented Aug 2, 2019

Currently, procedural macros provided by futures-async-stream cannot handle expressions in macros.

rust-lang/futures-rs#1548 (comment):

It is not possible to replace .await in macros such as assert!(foo.await) with this.

Full support for this can not be done without compiler support, but it can support for some kinds of macros (however, this is not necessarily preferable, as a macro may call an async block etc): taiki-e/futures-rs@fb33504

Related: Nemo157/embrio-rs#14

Refs: 5198fe4

@taiki-e taiki-e added the C-bug Category: related to a bug. label Sep 21, 2020
@douglas-raillard-arm
Copy link

Also looks like yield in a macro is not possible. I was trying to use a local macro to limit code duplication inside a function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants