Merge pull request #84 from Bobo1239/master

Remove `unique` feature which doesn't exist anymore
pull/86/head
Steve Klabnik 6 years ago committed by GitHub
commit 29d8ef48b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,7 +26,7 @@ this is totally fine.
For instance, a custom implementation of `Box` might write `Drop` like this: For instance, a custom implementation of `Box` might write `Drop` like this:
```rust ```rust
#![feature(ptr_internals, allocator_api, unique)] #![feature(ptr_internals, allocator_api)]
use std::alloc::{Alloc, Global, GlobalAlloc, Layout}; use std::alloc::{Alloc, Global, GlobalAlloc, Layout};
use std::mem; use std::mem;
@ -53,7 +53,7 @@ use-after-free the `ptr` because when drop exits, it becomes inaccessible.
However this wouldn't work: However this wouldn't work:
```rust ```rust
#![feature(allocator_api, ptr_internals, unique)] #![feature(allocator_api, ptr_internals)]
use std::alloc::{Alloc, Global, GlobalAlloc, Layout}; use std::alloc::{Alloc, Global, GlobalAlloc, Layout};
use std::ptr::{drop_in_place, Unique, NonNull}; use std::ptr::{drop_in_place, Unique, NonNull};
@ -126,7 +126,7 @@ The classic safe solution to overriding recursive drop and allowing moving out
of Self during `drop` is to use an Option: of Self during `drop` is to use an Option:
```rust ```rust
#![feature(allocator_api, ptr_internals, unique)] #![feature(allocator_api, ptr_internals)]
use std::alloc::{Alloc, GlobalAlloc, Global, Layout}; use std::alloc::{Alloc, GlobalAlloc, Global, Layout};
use std::ptr::{drop_in_place, Unique, NonNull}; use std::ptr::{drop_in_place, Unique, NonNull};

@ -3,7 +3,6 @@
```rust ```rust
#![feature(ptr_internals)] #![feature(ptr_internals)]
#![feature(allocator_api)] #![feature(allocator_api)]
#![feature(unique)]
use std::ptr::{Unique, NonNull, self}; use std::ptr::{Unique, NonNull, self};
use std::mem; use std::mem;

@ -71,7 +71,7 @@ take the hit and use std's Unique:
```rust ```rust
#![feature(ptr_internals, unique)] #![feature(ptr_internals)]
use std::ptr::{Unique, self}; use std::ptr::{Unique, self};

Loading…
Cancel
Save