Skip to content

Hide unstable items in beta/stable documentation? #25863

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

Closed
SimonSapin opened this issue May 28, 2015 · 3 comments
Closed

Hide unstable items in beta/stable documentation? #25863

SimonSapin opened this issue May 28, 2015 · 3 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@SimonSapin
Copy link
Contributor

I can’t find the link to this anymore, but I remember a user saying the seeing unstable methods and other items in the documentation felt like teasing, since they can’t be used in stable Rust.

Indeed, since they’re impossible to use, unstable items are effectively not there when you’re using the stable or beta channel. Should their documentation be removed entirely from https://doc.rust-lang.org/stable/std/ https://doc.rust-lang.org/beta/std/ ?

I think this could be done by having rustdoc consider that #[unstable] implies #[doc(hidden)] when option_env!("CFG_DISABLE_UNSTABLE_FEATURES").is_some().

CC @steveklabnik

@alexcrichton
Copy link
Member

It is currently an explicit decision to not hide these kinds of items in the documentation. It means that generating the documentation among the three release channels is much easier and more consistent, and it also gives you an idea of what's up and coming. We don't want to hide all unstable APIs 100% from everyone because much of the point of a nightly channel is to have users test the APIs before they're stabilized. Most users only browse the stable docs, so hiding all unstable APIs means that it's that much harder to discover.

I personally found that we had so few unstable APIs in the normal stable API surface areas that it wasn't noisy at all to see unstable APIs. If a documentation page is mostly unstable, then it means we should either remove or look to stabilizing the module. Most pages should have at most one or two unstable items.

@alexcrichton alexcrichton added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 28, 2015
@steveklabnik
Copy link
Member

Yes, what @alexcrichton said.

@SimonSapin
Copy link
Contributor Author

I didn’t know this was an explicit decision, and the reasons sound good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants