Remove `unique` feature which doesn't exist anymore

`Unique` was marked permanently-unstable in rust#46952 and its feature
flag was changed to `ptr_internals` which we're already using.
pull/84/head
Boris-Chengbiao Zhou 6 years ago
parent 4b3335d0da
commit 94964dee31

@ -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