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
Add a do-while loop macro #8
Conversation
Is this really useful? Using the macro requires more code than the expanded form, and the expanded form doesn't seem to be too bad (IMO). |
The expanded form is short but cryptic. You might prefer the macro if you prioritize readability, or you're writing code for an audience that isn't steeped in Rust idioms. I don't think it's tremendously useful, but I don't think there's anything wrong with including it, either. |
@@ -27,7 +27,8 @@ macro_rules! matches { | |||
} | |||
|
|||
/// Work around "error: unexpected token: `an interpolated tt`", whatever that | |||
/// means. | |||
/// means. (Probably rust-lang/rust#22819.) | |||
#[doc(hidden)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we could do without stuff like this, since it means you basically have to glob macro_use
from this crate to get any use, whereas macro_use(specific, macros)
would probably be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an unimplemented part of macro reform which allows an exported macro to list some private "helper macros".
I believe _tt_as_expr_hack
itself won't be necessary once rust-lang/rust#22819 is fixed.
I also think this is a reasonable thing to include. I'm curious to hear thoughts on my comment on the |
No description provided.