Skip to content

Commit 8a3c07a

Browse files
GoldsteinERalfJung
andcommitted
Clarify guarantees about ABI compatibility
Co-authored-by: Ralf Jung <[email protected]>
1 parent 71dfbea commit 8a3c07a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/ui/abi/compatibility.rs

+1
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ test_abi_compatible!(zst_array, Zst, [u8; 0]);
278278
test_abi_compatible!(nonzero_int, NonZero<i32>, i32);
279279

280280
// `#[repr(C)]` enums should not change ABI based on individual variant inhabitedness.
281+
// (However, this is *not* a guarantee. We only guarantee same layout, not same ABI.)
281282
enum Void {}
282283
test_abi_compatible!(repr_c_enum_void, ReprCEnum<Void>, ReprCEnum<ReprCUnion<Void>>);
283284

0 commit comments

Comments
 (0)