@rustlang discovery of the day: macro have access to the current scope. Link to test it: play.rust-lang.org/?version=โ€ฆ
1
1
I'd imagine it's that macro_rules has access to scoped symbols inside its scope, because I'm fairly sure if you move the macro_rules into an outer scope it won't work

Apr 26, 2020 ยท 3:48 PM UTC

1
Absolutely, that was my point. I found out this a long time ago and gave another try today. You have access to the block scope I assume.
1