Skip to content

Commit a9f61c2

Browse files
committed
Link "structs" in layout.struct
We have an existing link reference definition for "structs"; let's use that to link to the appropriate item.
1 parent 6e7a9cf commit a9f61c2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/type-layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ The only data layout guarantees made by this representation are those required f
170170
2. The alignment of the type is at least the maximum alignment of its fields.
171171

172172
r[layout.repr.rust.layout.struct]
173-
For structs, it is further guaranteed that the fields do not overlap. That is, the fields can be ordered such that the offset plus the size of any field is less than or equal to the offset of the next field in the ordering. The ordering does not have to be the same as the order in which the fields are specified in the declaration of the type.
173+
For [structs], it is further guaranteed that the fields do not overlap. That is, the fields can be ordered such that the offset plus the size of any field is less than or equal to the offset of the next field in the ordering. The ordering does not have to be the same as the order in which the fields are specified in the declaration of the type.
174174

175175
Be aware that this guarantee does not imply that the fields have distinct addresses: zero-sized types may have the same address as other fields in the same struct.
176176

0 commit comments

Comments
 (0)