You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that number literals that can be multiple numeric types allow a type suffix, such as 57u8, to designate the type.
This raises the question of which number literals cannot be multiple numeric types. My first thought was 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff, which can only be u128, but it does accept the suffix.
Seeing the history of this text (Misleading "byte literal" mention in 3.2. Data Types #1979), I see that it's meant to exclude byte literals (as they could be considered a kind of number literal) without naming them (because byte literals haven't been introduced yet).
Suggested fix:
Remove "that can be multiple numeric types", leaving a simpler sentence
main
branch to see if this has already been fixedURL to the section(s) of the book with this problem:
https://doc.rust-lang.org/book/ch03-02-data-types.html (but only in a newer version than on the web site)
Description of the problem:
0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff
, which can only beu128
, but it does accept the suffix.Suggested fix:
The text was updated successfully, but these errors were encountered: