Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The unique feature is renamed ptr_internals #48

Merged
merged 4 commits into from
Jan 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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