Skip to content

Commit d788f38

Browse files
authored
Merge pull request #1608 from RalfJung/layout-is-not-abi
type-layout: mention that call ABI compatibility is a separate concern
2 parents e271d9c + 34aa362 commit d788f38

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/type-layout.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ of type layout.
77
Type layout can be changed with each compilation. Instead of trying to document
88
exactly what is done, we only document what is guaranteed today.
99

10+
Note that even types with the same layout can still differ in how they are passed
11+
across function boundaries. For function call ABI compatibility of types,
12+
see [here][fn-abi-compatibility].
13+
1014
## Size and Alignment
1115

1216
All values have an alignment and size.
@@ -593,6 +597,7 @@ used with any other representation.
593597
[`Copy`]: std::marker::Copy
594598
[dynamically sized types]: dynamically-sized-types.md
595599
[field-less enums]: items/enumerations.md#field-less-enum
600+
[fn-abi-compatibility]: ../core/primitive.fn.md#abi-compatibility
596601
[enumerations]: items/enumerations.md
597602
[zero-variant enums]: items/enumerations.md#zero-variant-enums
598603
[undefined behavior]: behavior-considered-undefined.md

0 commit comments

Comments
 (0)