-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Description
The #6023 force to use a type suffix for integers. As discussed in rust-lang/rfcs#115 and #9940, the int and uint should only be used for memory-related values (e.g. length).
The documentations mostly use i suffix examples. It should encourage the use of fixed-size integer (e.g. u32) for common uses.
A more strict rule could be to remove the u and i from allowed suffixes, but to rely on full explicit typing (e.g. : int) when really needed.
This could be annoying for range-like functions but it's not that burdensome to use the explicit generic typing (e.g. range::<uint>(0, 5)).
Metadata
Metadata
Assignees
Labels
No labels