3 ms·
It's a bit like C's: #define MAC_TRAIT(i) trait T { i } MAC_TRAIT( fn foo() {} ) Except that in Rust macro arguments are typed and can dictate their
by pornel 7y ago
It's a bit like C's:
#define MAC_TRAIT(i) trait T { i }
MAC_TRAIT( fn foo() {} )
Except that in Rust macro arguments are typed and can dictate their own microsyntax. Macro output is assembled in the syntax tree, not as text find'n'replace, which also avoids many surprises.