From 84366b6f281614f61381962e2e46b73bb471c737 Mon Sep 17 00:00:00 2001 From: Alex Burka Date: Mon, 13 Jun 2016 17:47:18 -0400 Subject: [PATCH] recursion --- src/doc/book/ffi.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doc/book/ffi.md b/src/doc/book/ffi.md index fb8896da86d7..5a2ec86c12f5 100644 --- a/src/doc/book/ffi.md +++ b/src/doc/book/ffi.md @@ -580,10 +580,10 @@ 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. This means it is represented -as a single pointer, and the non-data variant is represented as the null pointer. This is -called an "optimization", but unlike other optimizations it is guaranteed to apply to -eligible types. +a single 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. The most common type that takes advantage of the nullable pointer optimization is `Option`, where `None` corresponds to `null`. So `Option c_int>` is a correct way