Skip to content

documentation on usize and isize incorrectly claims everything is 64-bit only #157222

Description

@psymar

Location (URL)

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

Summary

Every single constant, function etc on the stdlib doc pages for usize and isize says "Available on 64-bit only." As a programmer relatively new to rust (been using rust about a year), there have been a few times this has tripped me up into thinking that code using these types cannot check against these constants on other architectures. The actual problem, as I now see looking at the source, is that it's defined for different pointer sizes but rustdoc only seems to see the last of these.

While this is apparently known issue with rustdoc's doc_auto_cfg feature, it looks like that's not getting fixed anytime soon as there's been no discussion in years; is there any chance the docs could be rewritten to not rely on this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions