Allow expressions to be followed by blocks in macro arguments #30679
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
Rust macros try to be hygienic, soTo make sure you don't break Rust's syntax, it restricts what you can write after an expression, which means you can't do something like this:Since a block always has curly braces, I would expect an expression could be followed by a block but instead, you get this error:
I tested this on both stable (rustc 1.5.0 (3d7cd77 2015-12-04)) and nightly (rustc 1.7.0-nightly (2b8e96d 2015-12-21)), but got the same result.
The text was updated successfully, but these errors were encountered: