Re:Rust 1.43
by fulafel on Friday April 24, 2020 @01:27AM
(#22964934)
Rust macros are real, structural macros, like in most macro supporting langugaes. So they are not like the preprocessor style macros in C and relatives.
A good mental model is to think about this kind of macro is as a compiler callback that defines a syntax tree fragment in its body, to be evaluated when the macro is called.
A good mental model is to think about this kind of macro is as a compiler callback that defines a syntax tree fragment in its body, to be evaluated when the macro is called.