-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rustdoc should emit macro documentation #9954
Comments
This is a little tricky because all macros are lost after crate expansion. This would probably involve leaving behind sentinel values which are ignored for the rest of compilation, but remain to have the documentation. There's also the matter of what the documentation should show, and it should probably show the patterns for which the macro is defined (not just the name of the macro), and this is a bit tricky as well. Just things to consider though, don't mean to stop any progress on this! It would be awesome to have |
We now have exportable macros, so being able to document them is important. |
Also, cc #3163. |
Exported macro definitions are now left in the AST after expansion, so this should be easier. |
Don't lint `unnecessary_operation` in mixed macro contexts fixes rust-lang#9954 changelog: `unnecessary_operation`: Don't lint in mixed macro contexts.
It is now possible to add attributes to macros, so it is possible to add documentation to each one. The
rustdoc
tool should emit the macro documentation in a "MACROS" section (probably just before the "FUNCTIONS" section).The text was updated successfully, but these errors were encountered: