News for hackers. Stuff that matters.
Re:Rust 1.43 by CDSlice on Thursday April 23, 2020 @12:12PM (#22957512)
In this specific case the macro isn’t very useful since you can easily write `trait T { ... }` yourself. They tend to be more useful when there is a lot of similar boilerplate code that only differ in a few ways. A macro can cut down most of that repetition. They can also be used to provide pseudo “literals” like the vec! macro does for the Vec data type.

There are no comments on this comment yet.