Wait, how don't macro need to take escaped sigils?
Like range! takes range!('[' 0 , Inf ')' )?
Is 'do' still a keyword? I remember it being removed, pretty much everywhere. I just assumed it was thrown away.
Like range! takes range!('[' 0 , Inf ')' )?
Is 'do' still a keyword? I remember it being removed, pretty much everywhere. I just assumed it was thrown away.
And, it looks like do is no longer a keyword at all, I must've missed that part of the do-removal patch! So it is possible to call that macro do.
These are proper (hygienic) syntax macros, much like Scheme's syntax-rules. C's "macros" only work at the token level.
> Is 'do' still a keyword?
I believe it is still a reserved keyword, but not used anymore.
$ echo 'fn main() { let do = 1; }' | rustc -
runs with just an unused variable warning (if it were reserved it would fail with "error: `do` is a reserved keyword").