From 666d566eec4a41083f9ff85b04a2f3456989b722 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Sat, 9 Aug 2014 23:01:14 +0100 Subject: [PATCH] Replace mention of ~T by Box in the FFI guide. --- src/doc/guide-ffi.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/guide-ffi.md b/src/doc/guide-ffi.md index 600a9019e6b94..f0402c17e3f36 100644 --- a/src/doc/guide-ffi.md +++ b/src/doc/guide-ffi.md @@ -527,8 +527,8 @@ the `libc` module, and Rust links against `libc` and `libm` by default. # The "nullable pointer optimization" Certain types are defined to not be `null`. This includes references (`&T`, -`&mut T`), owning pointers (`~T`), and function pointers (`extern "abi" -fn()`). When interfacing with C, pointers that might be null are often used. +`&mut T`), boxes (`Box`), and function pointers (`extern "abi" fn()`). +When interfacing with C, pointers that might be null are often used. As a special case, a generic `enum` that contains exactly two variants, one of which contains no data and the other containing a single field, is eligible for the "nullable pointer optimization". When such an enum is instantiated