Skip to content

Commit

Permalink
Merge pull request #188 from TimDiekmann/rename-alloc
Browse files Browse the repository at this point in the history
Rename `Alloc` to `AllocRef`
  • Loading branch information
Centril authored Feb 17, 2020
2 parents 98d750a + 212cfe3 commit 8e07b14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/destructors.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ For instance, a custom implementation of `Box` might write `Drop` like this:
```rust
#![feature(ptr_internals, allocator_api)]

use std::alloc::{Alloc, Global, GlobalAlloc, Layout};
use std::alloc::{AllocRef, Global, GlobalAlloc, Layout};
use std::mem;
use std::ptr::{drop_in_place, NonNull, Unique};

Expand All @@ -55,7 +55,7 @@ However this wouldn't work:
```rust
#![feature(allocator_api, ptr_internals)]

use std::alloc::{Alloc, Global, GlobalAlloc, Layout};
use std::alloc::{AllocRef, Global, GlobalAlloc, Layout};
use std::ptr::{drop_in_place, Unique, NonNull};
use std::mem;

Expand Down Expand Up @@ -128,7 +128,7 @@ of Self during `drop` is to use an Option:
```rust
#![feature(allocator_api, ptr_internals)]

use std::alloc::{Alloc, GlobalAlloc, Global, Layout};
use std::alloc::{AllocRef, GlobalAlloc, Global, Layout};
use std::ptr::{drop_in_place, Unique, NonNull};
use std::mem;

Expand Down
2 changes: 1 addition & 1 deletion src/vec-final.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::ptr::{Unique, NonNull, self};
use std::mem;
use std::ops::{Deref, DerefMut};
use std::marker::PhantomData;
use std::alloc::{Alloc, GlobalAlloc, Layout, Global, handle_alloc_error};
use std::alloc::{AllocRef, GlobalAlloc, Layout, Global, handle_alloc_error};

struct RawVec<T> {
ptr: Unique<T>,
Expand Down

0 comments on commit 8e07b14

Please sign in to comment.