Skip to content

Document minimum size for usize and isize #48593

Open
@clarfonthey

Description

@clarfonthey

Right now, usize and isize are "guaranteed" to be at least a byte long, but nothing more. It seems unlikely that Rust will support 8-bit targets in the future, but this is what the TryFrom implementations indicate.

A lot of people assume that usize will be at least 32 bits but this is not true for all platforms. I think that the docs should be clarified to make people more aware of this behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.P-mediumMedium priorityT-langRelevant to the language teamWG-embeddedWorking group: Embedded systems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions