Skip to content

(rustdoc) usize and isize associated items only available on 64-bit. #150536

Closed as duplicate

Description

@bjoernager

Location (URL)

https://doc.rust-lang.org/nightly/std/primitive.usize.html

https://doc.rust-lang.org/nightly/std/primitive.isize.html

Summary

doc_cfg labels all associated items of usize and isize with Available on 64-bit only., even when the item in question is portable and has a constant signature across targets (e.g. all methods).

Currently applies to nightly and beta.

What I would call optimal: Only associated constants that are formally-platform-dependent (e.g. MIN and MAX) should be labelled.

Possible fix: Move portable item implementations out of the cfg'ed impl blocks. This would maybe require splitting the int_impl and uint_impl macros, e.g. int_impl_conditional and int_impl_portable.

Activity

  1. added
    A-docs
    on Dec 31, 2025
  2. added
    needs-triage
    on Dec 31, 2025
  3. theemathas commented on Dec 31, 2025

    @theemathas
    Contributor

    Thanks for reporting. This is a duplicate of #149786.

  4. bjoernager commented on Dec 31, 2025

    @bjoernager
    ContributorAuthor

    Thanks for letting me know. I must've missed it when I looked for an existing issue. :/

  5. removed
    needs-triage
    on Jan 4, 2026
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

    A-docs

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions