@@ -86,8 +86,8 @@ String slices are a UTF-8 representation of characters that have the same layout
86
86
87
87
## Tuple Layout
88
88
89
- Tuples have the same layout guarantees a struct with the same fields laid out
90
- according to the default struct representation.
89
+ Tuples have the same layout guarantees as a struct with the same fields when
90
+ laid out according to the default struct representation.
91
91
92
92
The exception to this is the unit tuple (` () ` ), which is guaranteed as a
93
93
zero-sized type to have a size of 0 and an alignment of 1.
@@ -163,12 +163,12 @@ representation will not change the layout of `Inner`.
163
163
Nominal types without a ` repr ` attribute have the default representation.
164
164
Informally, this representation is also called the ` rust ` representation.
165
165
166
- There are very few data layout guarantees made by this representation. The only
167
- guarantees are:
166
+ The only data layout guarantees made by this representation are those required
167
+ for soundness. They are:
168
168
169
169
1 . The fields of the struct are properly aligned.
170
170
2 . The fields do not overlap.
171
- 3 . The alignment of the struct is not less than the alignment of any of its
171
+ 3 . The minimum alignment of the struct is at least the maximum alignment of its
172
172
fields.
173
173
174
174
Formally, the first guarantee means that the offset of any field in the struct
@@ -182,6 +182,8 @@ Be aware that the second guarantee does not imply that the fields have distinct
182
182
addresses: zero-sized types may have the same address as other fields in the
183
183
same struct.
184
184
185
+ There are no other guarantees of data layout made by this representation.
186
+
185
187
### The ` C ` Representation
186
188
187
189
The ` C ` representation is designed for dual purposes. One purpose is for
0 commit comments