Skip to content

Commit b732072

Browse files
committed
Language
1 parent 46b71b7 commit b732072

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
@@ -68,18 +68,17 @@ C does not expose equivalent types in `<stdint.h>`.
6868

6969
Rust fixed-width integer types are therefore safe to use directly in C FFI where
7070
the corresponding C fixed-width integer types are expected.
71-
integer types are expected.
7271

7372
### Layout compatibility with C native integer types
7473

7574
The specification of native C integer types, `char`, `short`, `int`, `long`,
76-
... as well as their `unsigned` variants, has a lower bound on their size,
75+
... as well as their `unsigned` variants, guarantees a lower bound on their size,
7776
e.g., `short` is _at least_ 16-bit wide and _at least_ as wide as `char`.
78-
Their actual exact sizes are _implementation-defined_.
77+
Their exact sizes are _implementation-defined_.
7978

8079
Libraries like `libc` use knowledge of this _implementation-defined_ behavior on
8180
each platform to select a layout-compatible Rust fixed-width integer type when
82-
interfacing with native C integer types.
81+
interfacing with native C integer types (e.g. `libc::c_int`).
8382

8483
> **Note**: Rust does not support C platforms on which the C native integer type
8584
> are not compatible with any of Rust's fixed-width integer type (e.g. because

0 commit comments

Comments
 (0)