Skip to content

Commit 8b6663b

Browse files
gnzlbgRalfJung
andauthored
Update reference/src/layout/unions.md
Co-Authored-By: Ralf Jung <[email protected]>
1 parent 8f9de1c commit 8b6663b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: reference/src/layout/unions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ assert_eq!(size_of::<U>(), 2);
5757
# }
5858
``**
5959

60-
**Note**: there is no room between fields for padding, so `repr(C)` unions can
60+
**Note**: Fields are overlapped instead of laid out sequentially, so unlike structs there is no "between the fields" that could be filled with padding.
6161
only have trailing padding.
6262

6363
The bit `i` of a `repr(C)` union is a padding bit if the bit `i` of each of its

0 commit comments

Comments
 (0)