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.
1 parent 44c79c8 commit 5bc2515Copy full SHA for 5bc2515
src/type-layout.md
@@ -345,7 +345,8 @@ r[layout.repr.c.enum]
345
#### `#[repr(C)]` Field-less Enums
346
347
For [field-less enums], the `C` representation requires the discriminant values to
348
-be representable by the `int` type in the target platform's C ABI.
+either all be representable by the `int` type in the target platform's C ABI,
349
+or to all be representable by the `unsigned int` type.
350
Nevertheless, the type of the discriminant is `isize`.
351
The size and alignment of the enum then match that of a C enum with the same
352
discriminant values (and without a fixed underlying type).
0 commit comments