Skip to content

Commit

Permalink
not just a single field
Browse files Browse the repository at this point in the history
  • Loading branch information
durka committed Jul 27, 2016
1 parent 84366b6 commit 0016af5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/book/ffi.md
Expand Up @@ -580,7 +580,7 @@ However, the language provides a workaround.

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

0 comments on commit 0016af5

Please sign in to comment.