3 ms·
Well, one of the advantages of having two ways to do macros is that macro_rules! macros are much much faster than procedural macros.
by aliceryhl 5y ago
Well, one of the advantages of having two ways to do macros is that macro_rules! macros are much much faster than procedural macros.
- mamcx 5y agoYeah, but then why not make it the only one? One reason is that proc-macros can "see" the syntax outside the point of declaration(or enclosed). This means you must do macro_rules! {struct.... } instead of declare the struct first then forward it.