Re:Rust 1.43
by progval on Thursday April 23, 2020 @11:50AM
(#22957258)
The first block defines a macro; the second block is the macro usage.
The goal of macros is to deduplicate code; either inside a function or to implement traits (eg. the Debug trait, that allows printing a structure/enumeration/... recursively; this would be very boring to implement yourself every time)
The goal of macros is to deduplicate code; either inside a function or to implement traits (eg. the Debug trait, that allows printing a structure/enumeration/... recursively; this would be very boring to implement yourself every time)