@@ -28,7 +28,7 @@ For instance, a custom implementation of `Box` might write `Drop` like this:
2828``` rust
2929#![feature(ptr_internals, allocator_api)]
3030
31- use std :: alloc :: {Alloc , Global , GlobalAlloc , Layout };
31+ use std :: alloc :: {AllocRef , Global , GlobalAlloc , Layout };
3232use std :: mem;
3333use std :: ptr :: {drop_in_place, NonNull , Unique };
3434
@@ -55,7 +55,7 @@ However this wouldn't work:
5555``` rust
5656#![feature(allocator_api, ptr_internals)]
5757
58- use std :: alloc :: {Alloc , Global , GlobalAlloc , Layout };
58+ use std :: alloc :: {AllocRef , Global , GlobalAlloc , Layout };
5959use std :: ptr :: {drop_in_place, Unique , NonNull };
6060use std :: mem;
6161
@@ -128,7 +128,7 @@ of Self during `drop` is to use an Option:
128128``` rust
129129#![feature(allocator_api, ptr_internals)]
130130
131- use std :: alloc :: {Alloc , GlobalAlloc , Global , Layout };
131+ use std :: alloc :: {AllocRef , GlobalAlloc , Global , Layout };
132132use std :: ptr :: {drop_in_place, Unique , NonNull };
133133use std :: mem;
134134
0 commit comments