Skip to content

Document the maximum and minimum values of each number type #66099

Closed
@yoshuawuyts

Description

@yoshuawuyts

Values such as u8::MAX are nice when coding because they capture the max allowed value of a number without needing to hard-code it yourself, or apply tricks to compute it.

However when trying to decide which number type to use, it'd be nice to have a plain-text definition of the number types in the documentation. Because even clicking through to the source does not yield the information you're looking for.

I think this would be a small change that could make getting used to Rust's number types significantly easier. Thanks!

Screenshots

Screenshot_2019-11-05 std i8 MAX - Rust
Rust's MAX docs don't contain much information currently. It seems like it wouldn't be too bad to add a bit more to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions