Skip to content

Commit 84366b6

Browse files
committed
recursion
1 parent cc2fc48 commit 84366b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/doc/book/ffi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,10 +580,10 @@ However, the language provides a workaround.
580580

581581
As a special case, an `enum` is eligible for the "nullable pointer optimization" if it
582582
contains exactly two variants, one of which contains no data and the other contains
583-
a single field of one of the non-nullable types listed above. This means it is represented
584-
as a single pointer, and the non-data variant is represented as the null pointer. This is
585-
called an "optimization", but unlike other optimizations it is guaranteed to apply to
586-
eligible types.
583+
a single field of one of the non-nullable types listed above (or a struct containing such a type).
584+
This means it is represented as a single pointer, and the non-data variant is represented as a
585+
null pointer. This is called an "optimization", but unlike other optimizations it is guaranteed
586+
to apply to eligible types.
587587

588588
The most common type that takes advantage of the nullable pointer optimization is `Option<T>`,
589589
where `None` corresponds to `null`. So `Option<extern "C" fn(c_int) -> c_int>` is a correct way

0 commit comments

Comments
 (0)