Skip to content

Macro docs put the implementation after the description #17680

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

Closed
wants to merge 1 commit into from

Conversation

gamazeps
Copy link
Contributor

@gamazeps gamazeps commented Oct 1, 2014

This puts the description of marcos before their implementation.
It doesn't put the implementation at the bottom, but doing so while keeping the description on top would require a bigger rewrite of the file (as the description is currectly linked to the macro code, and separationg them would require creating another Item).
I'll look into it later
Closes #17616

May be better to also put the traits and methods before ...
Closes rust-lang#17616
@alexcrichton
Copy link
Member

This isn't necessarily a local problem with just macros, no matter what order we place item definitions and documentation, there are pathological cases where both systems are difficult to understand. Right now "definition first then documentation" is consistent with the rest of the style that rustdoc uses. Additionally, bitflags! is a bit of an outlier in that most macros are not as large.

That being said, the navigability of rustdoc I think could always use some improvements, but I'm worried that this is locally optimizing for one outlier.

@gamazeps
Copy link
Contributor Author

gamazeps commented Oct 1, 2014

Oki dak :)

@aturon
Copy link
Member

aturon commented Oct 17, 2014

I'm going to go ahead and close this PR. Thanks for putting it together, though!

@aturon aturon closed this Oct 17, 2014
@gamazeps gamazeps deleted the issue17616 branch May 7, 2017 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: show macro interface but not implementation
3 participants