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: stabilized (added) versions of enum variants are hard to read #86342

Closed
JohnTitor opened this issue Jun 16, 2021 · 8 comments · Fixed by #86370
Closed

rustdoc: stabilized (added) versions of enum variants are hard to read #86342

JohnTitor opened this issue Jun 16, 2021 · 8 comments · Fixed by #86370
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@JohnTitor
Copy link
Member

Go to: https://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html#variant.OutOfMemory
It was stabilized (i.e. added) in 1.54.0 but the rustdoc generates like:

the added versions of enum variants are hard to read

The problem is that the previous variant's version is placed at the same height. I think it's ideal to place the version of the item itself at the same height, like functions.

@JohnTitor JohnTitor added C-bug Category: This is a bug. A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc labels Jun 16, 2021
@matteo-briani
Copy link

I am new here but it looks like something I could do.
Can you point me in the right direction?

@JohnTitor
Copy link
Member Author

Sorry but I'm not familiar with rustdoc, @jyn514 could you help them?

@jyn514
Copy link
Member

jyn514 commented Jun 16, 2021

I don't have time, sorry. @GuillaumeGomez may have suggestions.

@GuillaumeGomez
Copy link
Member

I can help if needed. But first: how would you want it to look like?

@JohnTitor
Copy link
Member Author

As mentioned first, the version at the same height should be the variant's IMO.

@GuillaumeGomez
Copy link
Member

Ah ok sorry, so it's a layout bug. I thought you wanted to improve the display (which would be welcome too!).

The problematic line is this one. It should be set before the docblock (in the variant header if possible).

@matteo-briani
Copy link

I will gladly take a look at it, so I can familiarize with the codebase.

@GuillaumeGomez
Copy link
Member

Sure, go ahead! Do test locally:

./x.py doc std --stage 1 --open

Like that you can then go to the page and check if the bug is fixed. ;)

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Jun 19, 2021
…d-versions-layout, r=GuillaumeGomez

Fix rustdoc stabilized versions layout

Fixes rust-lang#86342
r? ``@GuillaumeGomez``
@bors bors closed this as completed in 41bf471 Jun 19, 2021
@jyn514 jyn514 added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. 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