Skip to content

Hide unstable items in beta/stable documentation? #25863

Closed
@SimonSapin

Description

@SimonSapin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions