syn
syn copied to clipboard
Add “example of an attribute macro” and “example of fn-like macro” to the main docs
I think https://docs.rs/syn/1.0.76/syn/index.html is a landing page for proc macro docs. As such, it would be useful to include copy-passable example of attribute and function like macros.
Strictly speaking, it’s not the syn’s job to teach what is the signature of attr macro function. Practically syn’s docs is where I personally try to find this info first :)
See https://users.rust-lang.org/t/why-are-the-existing-guides-to-procedural-macros-so-scattered/64617 for context