Skip to content

Commit d8d7edb

Browse files
committed
Clarify that all platforms we support have a C platform
1 parent 66a8182 commit d8d7edb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

reference/src/layout/scalars.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ They have the same layout as the [pointer types] for which the pointee is
3838
`Sized`, and are layout compatible with C's `uintptr_t` and `intptr_t` types.
3939

4040
> **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. That is, on
42-
> all platforms that we currently support, which have a C platform,
43-
> `isize`/`usize` are at least 16-bit wide. Currently, `libcore` unconditionally
44-
> provides impls of `From<i16>`/`From<u16>` for `isize`/`usize`.
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.
4544
4645
> **Note**: Rust's `usize` and C's `unsigned` types are **not** equivalent. C's
4746
> `unsigned` is at least as large as a short, allowed to have padding bits, etc.

0 commit comments

Comments
 (0)