We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 103a2b5 + d8d7edb commit 401e559Copy full SHA for 401e559
reference/src/layout/scalars.md
@@ -37,6 +37,11 @@ The `isize` and `usize` types are pointer-sized signed and unsigned integers.
37
They have the same layout as the [pointer types] for which the pointee is
38
`Sized`, and are layout compatible with C's `uintptr_t` and `intptr_t` types.
39
40
+> **Note**: C99 [7.18.2.4](https://port70.net/~nsz/c/c99/n1256.html#7.18.2.4)
41
+> requires `uintptr_t` and `intptr_t` to be at least 16-bit wide. All
42
+> platforms we currently support have a C platform, and as a consequence,
43
+> `isize`/`usize` are at least 16-bit wide for all of them.
44
+
45
> **Note**: Rust's `usize` and C's `unsigned` types are **not** equivalent. C's
46
> `unsigned` is at least as large as a short, allowed to have padding bits, etc.
47
> but it is not necessarily pointer-sized.
0 commit comments