logoalt Hacker News

mamcxtoday at 6:01 PM1 replyview on HN

yeah, lets be clear:

Most of the proc macros non-sense is to be able to annotate the enum or struct without wrapping it.

So that is why I use this hack:

https://docs.rs/macro_rules_attribute/0.2.2/macro_rules_attr...

P.D: Is there a true actually reason for proc-macros apart for this weird restriction?? And even if yes, how much nice things will be if this kind of scenario was already present so most not need to reach for proc-macros


Replies

Sagi21805today at 6:50 PM

That's really cool, I was not familiar with this and will look into it!