Skip to content
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: Inline reexported items if possible #13739

Closed

Conversation

lifthrasiir
Copy link
Contributor

Fixes #13414 and possibly #13045. Some examples to look at: std::io, std::prelude, libc. (Sorry, no tests yet!)

There are some known exceptions to inlining (e.g. statics), so they are preserved to the reexport section as much as possible. It would be desirable to remove such exceptions in the future.

Some mandatory screenshots

From std::io:

std-io

From std::prelude (this would completely inline every item except for std::gc::GC, which is a static):

std-prelude

@brson
Copy link
Contributor

brson commented Apr 25, 2014

This does not seem to be what #13414 is asking for. From what I can tell, that bug is asking that, in the documentation at the original location list the other reexports that this type is known as.

Regardless, this change is interesting. I was worried about doing this because it might make it look like there are multiple different types with the same name, but adding (Reexport) makes it obvious there's something else going on.

Is there any link from the reexport back to the original?

@lifthrasiir
Copy link
Contributor Author

@brson Ah, well, I seemed to misread #13414. That would require a different machinery (namely, cache.reexports?) so it requires separate work.

Is there any link from the reexport back to the original?

There is no separate page for the reexported item anyway, so it always links to the original.

some examples to look at: `std::io`, `std::prelude`, `libc`.

there are some known exceptions to inlining (e.g. statics),
so they are preserved to the reexport section as much as possible.
it would be desirable to remove such exceptions in the future.
@lifthrasiir
Copy link
Contributor Author

Fixed a commit message.

@alexcrichton
Copy link
Member

Closing due to inactivity, but feel free to reopen with a rebase!

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.

List re-exports of a symbol in the documentation for that symbol
3 participants