We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fa1326c + 2df3009 commit 19f6311Copy full SHA for 19f6311
src/casts.md
@@ -46,6 +46,7 @@ expression, `e as U2` is not necessarily so.
46
For numeric casts, there are quite a few cases to consider:
47
48
* casting between two integers of the same size (e.g. i32 -> u32) is a no-op
49
+ (Rust uses 2's complement for negative values of fixed integers)
50
* casting from a larger integer to a smaller integer (e.g. u32 -> u8) will
51
truncate
52
* casting from a smaller integer to a larger integer (e.g. u8 -> u32) will
0 commit comments