You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/type-layout.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -350,6 +350,7 @@ or to all be representable by the `unsigned int` type.
350
350
Nevertheless, the type of the discriminant is `isize`.
351
351
The size and alignment of the enum then match that of a C enum with the same
352
352
discriminant values (and without a fixed underlying type).
353
+
Crucially, the equivalent C type is determined based on the discriminant values *after* they have been cast to `isize`.
353
354
354
355
> [!NOTE]
355
356
> The enum representation in C is implementation defined, so this is really a "best guess". In particular, this may be incorrect when the C code of interest is compiled with certain flags.
0 commit comments