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 rendering of underscore_imports a.k.a. impl-only-use is unuseful #61592

Closed
Nemo157 opened this issue Jun 6, 2019 · 3 comments
Closed
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Nemo157
Copy link
Member

Nemo157 commented Jun 6, 2019

I tried using a lot of pub use Foo as _; in futures to avoid issues with preludes and extension trait shadowing, unfortunately Rustdoc currently doesn't seem to have any special handling of this feature resulting in a big list of exported _ traits:

Screenshot 2019-06-06 at 18 50 37

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jun 6, 2019
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Jun 6, 2019

Well, looks as expected from my opinion. 🤣

What do you suggest that rustdoc should do in this case?

@Nemo157
Copy link
Member Author

Nemo157 commented Jun 6, 2019

I really can't think of something that's super obvious. What I would want is to have the original name in there as the main link, but somehow making it obvious that the name isn't actually visible at this path.

Actually, looking at this a little more there is an actual bug here that really makes these docs unusable, all those _ traits link to the page futures/prelude/trait._.html, which then includes the documentation for just one of them.


Hmmm, playing with it a little more I tried using doc(no_inline) on all these, I think that looks better than having the traits inlined as _, maybe if a trait is exported as _ and is exposed elsewhere in the crate documentation it should default to no_inline?

Screenshot 2019-06-06 at 23 19 09

@GuillaumeGomez
Copy link
Member

Sounds like a good idea. I'll try to do it *soon*.

@GuillaumeGomez GuillaumeGomez self-assigned this Jun 6, 2019
@jyn514 jyn514 added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Dec 16, 2020
0urobor0s added a commit to 0urobor0s/rust that referenced this issue Dec 21, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Dec 31, 2020
Rustdoc render public underscore_imports as Re-exports

Fixes rust-lang#61592
bors added a commit to rust-lang-ci/rust that referenced this issue Dec 31, 2020
Rustdoc render public underscore_imports as Re-exports

Fixes rust-lang#61592
@bors bors closed this as completed in cb4553b Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants