Skip to content

Commit

Permalink
Merge pull request #48 from SimonSapin/unique
Browse files Browse the repository at this point in the history
The `unique` feature is renamed `ptr_internals`
  • Loading branch information
Gankra authored Jan 21, 2018
2 parents 2f7b05f + 3bdc990 commit b5e784d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/destructors.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ this is totally fine.
For instance, a custom implementation of `Box` might write `Drop` like this:

```rust
#![feature(unique, allocator_api)]
#![feature(ptr_internals, allocator_api)]

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

```rust
#![feature(allocator_api, unique)]
#![feature(allocator_api, ptr_internals)]

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

```rust
#![feature(allocator_api, unique)]
#![feature(allocator_api, ptr_internals)]

use std::heap::{Alloc, Heap, Layout};
use std::ptr::{drop_in_place, Unique};
Expand Down
2 changes: 1 addition & 1 deletion src/vec-final.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The Final Code

```rust
#![feature(unique)]
#![feature(ptr_internals)]
#![feature(allocator_api)]

use std::ptr::{Unique, self};
Expand Down
2 changes: 1 addition & 1 deletion src/vec-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ take the hit and use std's Unique:


```rust
#![feature(unique)]
#![feature(ptr_internals)]

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

Expand Down

0 comments on commit b5e784d

Please sign in to comment.