Skip to content

Commit 666d566

Browse files
committed
Replace mention of ~T by Box<T> in the FFI guide.
1 parent e8ad6a8 commit 666d566

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/guide-ffi.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,8 @@ the `libc` module, and Rust links against `libc` and `libm` by default.
527527
# The "nullable pointer optimization"
528528
529529
Certain types are defined to not be `null`. This includes references (`&T`,
530-
`&mut T`), owning pointers (`~T`), and function pointers (`extern "abi"
531-
fn()`). When interfacing with C, pointers that might be null are often used.
530+
`&mut T`), boxes (`Box<T>`), and function pointers (`extern "abi" fn()`).
531+
When interfacing with C, pointers that might be null are often used.
532532
As a special case, a generic `enum` that contains exactly two variants, one of
533533
which contains no data and the other containing a single field, is eligible
534534
for the "nullable pointer optimization". When such an enum is instantiated

0 commit comments

Comments
 (0)