-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rustdoc shows impls out of source order #80713
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
Comments
I'm not sure what this issue is about. Regarding my comment: Generally, things appear in rustdoc in the order they appear in the source code. For that one impl block with my comment, it appears out of order with the source code for some reason. What does a table of contents have to do with documentation ordering? |
This TOC would come in handy for me. I have one "god" struct as a high-level construct, and the I think there's value here, but I'm not sure what the best way to add a TOC would be. Maybe only generate it if there's more than one |
Oh, I didn't realize that from the comment. I see - the issue is that rustdoc processes the submodules ( I'll change this issue to track that bug instead, since it sounds like #40273 is already tracking the table of contents issue. |
I have this issue in a personal project as well: I have a parser that's split up into several submodules and each submodule has an Even if I put the |
I'm torn on this. On one hand, this is clearly distorting the SGX docs: https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#asynchronous-usercalls
On the other, SGX is sort of abusing rustdoc here. Maybe we should suggest using modules to group the docs instead of impl blocks?
The other issue is that if rustdoc does this, it will look very strange for impls without a doc-comment.
cc @jethrogb, git says you wrote those docs.
The text was updated successfully, but these errors were encountered: