File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,11 @@ overlap. This can be visualized as follows:
25
25
26
26
The individual fields (` [field{i}_ty_] ` ) are blocks of fixed size determined by
27
27
the field's layout. The only degrees of freedom the compiler has when computing
28
- the layout of a union are the size of the union and the offset of each union
29
- field within its variant. How these are picked depends on certain constraints,
30
- lik for example, the alignment requirements of the fields, the ` #[repr] `
31
- attribute of the ` union ` , etc.
28
+ the layout of a union are the size of the union, which can be larger than the
29
+ size of its largest field, and the offset of each union field within its
30
+ variant. How these are picked depends on certain constraints, lik for example,
31
+ the alignment requirements of the fields, the ` #[repr] ` attribute of the
32
+ ` union ` , etc.
32
33
33
34
### Unions with default layout ("` repr(Rust) ` ")
34
35
You can’t perform that action at this time.
0 commit comments