Skip to content

Commit 03697eb

Browse files
authored
Merge pull request #49 from SimonSapin/unique
The `unique` feature is renamed `ptr_internals`
2 parents 7dfcd07 + 2b35eba commit 03697eb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/destructors.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ this is totally fine.
2626
For instance, a custom implementation of `Box` might write `Drop` like this:
2727

2828
```rust
29-
#![feature(unique, allocator_api)]
29+
#![feature(ptr_internals, allocator_api)]
3030

3131
use std::heap::{Heap, Alloc, Layout};
3232
use std::mem;
@@ -52,7 +52,7 @@ use-after-free the `ptr` because when drop exits, it becomes inaccessible.
5252
However this wouldn't work:
5353

5454
```rust
55-
#![feature(allocator_api, unique)]
55+
#![feature(allocator_api, ptr_internals)]
5656

5757
use std::heap::{Heap, Alloc, Layout};
5858
use std::ptr::{drop_in_place, Unique};
@@ -123,7 +123,7 @@ The classic safe solution to overriding recursive drop and allowing moving out
123123
of Self during `drop` is to use an Option:
124124

125125
```rust
126-
#![feature(allocator_api, unique)]
126+
#![feature(allocator_api, ptr_internals)]
127127

128128
use std::heap::{Alloc, Heap, Layout};
129129
use std::ptr::{drop_in_place, Unique};

src/vec-final.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The Final Code
22

33
```rust
4-
#![feature(unique)]
4+
#![feature(ptr_internals)]
55
#![feature(allocator_api)]
66

77
use std::ptr::{Unique, self};

src/vec-layout.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ take the hit and use std's Unique:
7171

7272

7373
```rust
74-
#![feature(unique)]
74+
#![feature(ptr_internals)]
7575

7676
use std::ptr::{Unique, self};
7777

0 commit comments

Comments
 (0)