From 34aa3622c44cdff543086ae30c850fa1105ccb31 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 10 Sep 2024 12:49:29 +0200 Subject: [PATCH] type-layout: mention that call ABI compatibility is a separate concern --- src/type-layout.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/type-layout.md b/src/type-layout.md index 1f4b6b1a2..2edab7989 100644 --- a/src/type-layout.md +++ b/src/type-layout.md @@ -7,6 +7,10 @@ of type layout. Type layout can be changed with each compilation. Instead of trying to document exactly what is done, we only document what is guaranteed today. +Note that even types with the same layout can still differ in how they are passed +across function boundaries. For function call ABI compatibility of types, +see [here][fn-abi-compatibility]. + ## Size and Alignment All values have an alignment and size. @@ -593,6 +597,7 @@ used with any other representation. [`Copy`]: std::marker::Copy [dynamically sized types]: dynamically-sized-types.md [field-less enums]: items/enumerations.md#field-less-enum +[fn-abi-compatibility]: ../core/primitive.fn.md#abi-compatibility [enumerations]: items/enumerations.md [zero-variant enums]: items/enumerations.md#zero-variant-enums [undefined behavior]: behavior-considered-undefined.md