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

Confusing display of 1.0.0 stability #90552

Closed
jsha opened this issue Nov 4, 2021 · 2 comments · Fixed by #91694
Closed

Confusing display of 1.0.0 stability #90552

jsha opened this issue Nov 4, 2021 · 2 comments · Fixed by #91694
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jsha
Copy link
Contributor

jsha commented Nov 4, 2021

At https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html (same issue on stable), the "1.0.0" stability on the right-hand side is displayed inconsistently. It seems to show up only when there is also const stability to display. Example:

image

new shows stability of 1.0.0 (const: 1.39.0). with_capacity shows no stability information. But both have #[stable(feature = "rust1", since = "1.0.0")]:

https://doc.rust-lang.org/nightly/src/alloc/vec/mod.rs.html#424
https://doc.rust-lang.org/nightly/src/alloc/vec/mod.rs.html#469

Note: Hiding 1.0.0 stability for the stdlib may actually be the right thing to do, to reduce noise. But if that's the intent, we should do it consistently - for instance also hiding 1.0.0 in the <h1> at the top of the page.

@jsha jsha added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels Nov 4, 2021
@KamilaBorowska
Copy link
Contributor

In general, Rust documentation doesn't show stability information when it matches stability of a type itself.

@jsha
Copy link
Contributor Author

jsha commented Nov 9, 2021

Ah, that makes sense - though it's hard to discover that property as a user. Maybe the main fix here is to change 1.0.0 (const: 1.39.0) to just const: 1.39.0.

@camelid camelid changed the title Inconsistent display of 1.0.0 stability Confusing display of 1.0.0 stability Dec 15, 2021
@camelid camelid added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Dec 15, 2021
@bors bors closed this as completed in 405cf20 Jan 20, 2022
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-enhancement Category: An issue proposing an enhancement or a PR with one. 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.

3 participants