Skip to content

Feature request: show rustc_const_unstable in generated documentation #81371

Closed
@ChaiTRex

Description

@ChaiTRex

Describe the problem you are trying to solve

I looked at the documentation for core::mem::variant_count. It does mention that the function is nightly-only:

🔬 This is a nightly-only experimental API.
(variant_count #73662)

It misleadingly doesn't mention that const fn can also be enabled on nightly, which requires opening the [src] link and noticing:

#[rustc_const_unstable(feature = "variant_count", issue = "73662")]

Describe the solution you'd like

When the rustc_const_unstable attribute is applied to a function, show that, much like nightly-only functions are shown in the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)A-stabilityArea: `#[stable]`, `#[unstable]` etc.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.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