Skip to content

Commit e8ecdc4

Browse files
authored
restrict the guarantee to when the ZST has no fields at all.
1 parent 2c258cc commit e8ecdc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

text/0000-result_ffi_guarantees.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ When either of these two `core` types:
2929

3030
* `Option<T>`
3131
* `Result<T, E>` where either `T` or `E` meet all of the following conditions:
32-
* Are a zero-sized type with alignment 1 (a "1-ZST").
33-
* Either have no fields (eg: `()` or `struct Foo;`) or have `repr(transparent)` if there are fields.
34-
* Do not have the `#[non_exhaustive]` attribute.
32+
* Is a zero-sized type with alignment 1 (a "1-ZST").
33+
* Has no fields.
34+
* Does not have the `#[non_exhaustive]` attribute.
3535

3636
Is combined with a non-zero or non-null type (see the chart), the combination has the same layout (size and alignment) and the same ABI as the primitive form of the data.
3737

0 commit comments

Comments
 (0)