Skip to content

Commit ac0cc9c

Browse files
committed
Reword guarantee
1 parent 0daf227 commit ac0cc9c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

reference/src/layout/structs-and-tuples.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,8 @@ x: u16, y: T }` where `T = u32` are not guaranteed to be identical.
124124

125125
#### Zero-sized structs
126126

127-
Structs with default layout (`repr(Rust)`), layout with increased alignment
128-
(`repr(align(N))`), packed layout (`repr(packed(N))`), or C-compatible layout
129-
(`repr(C)`) are zero-sized, if they contain no fields of non-zero size. That is,
130-
either the type has no fields, or all of its fields have zero size.
127+
For `repr(Rust)`, `repr(packed(N))`, `repr(align(N))`, and `repr(C)`
128+
structs: if all fields of a struct have size 0, then the struct has size 0.
131129

132130
For example, all these types are zero-sized:
133131

0 commit comments

Comments
 (0)