Skip to content

For stable const fn, rustdoc does not always show both the version of fn stabilization and const stabilization #121989

Open

Description

@RalfJung

Consider for instance this:

It just says "const: 1.32.0". Other functions say "1.27.0 (const: 1.32.0)". That seems like a bug?

Activity

  1. added
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    on Mar 4, 2024
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Mar 4, 2024
  3. changed the title [-]For stable const fn, rustfmt does not always show both the version of `fn` stabilization and `const` stabilization[/-] [+]For stable const fn, rustdoc does not always show both the version of `fn` stabilization and `const` stabilization[/+] on Mar 4, 2024
  4. RalfJung commented on Mar 4, 2024

    @RalfJung
    MemberAuthor

    It was pointed out that rustdoc omits the version of a method when it equals the type. That makes sense when the version is then entirely omitted, but here the "const" version is still shown; I interpreted this as meaning "1.32 is when this got stabilized" and didn't realize it mean only const-stabilization (and "scroll up to the top of this page" for the other version).

  5. asquared31415 commented on Mar 4, 2024

    @asquared31415
    Contributor

    in my opinion it's always useful to see the stabilization version, even if it's the same as the containing type's stabilization version. the ui element is not obstructive or distracting, doesn't take up much space, and the space it takes is already not particularly valuable space.

  6. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.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