-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Document the maximum and minimum values of each number type #66099
Copy link
Copy link
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: 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.Call 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.Call for participation: Help is requested to fix this issue.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: 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.Call 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.Call for participation: Help is requested to fix this issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Values such as
u8::MAXare 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
Rust's
MAXdocs don't contain much information currently. It seems like it wouldn't be too bad to add a bit more to it.