about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-04-02 08:07:10 +0000
committerbors <bors@rust-lang.org>2018-04-02 08:07:10 +0000
commit135f334e0a3177146f7417cee7ceaf405ffe732d (patch)
tree8de13ba3e2ecf944a54f570ecb2dbfd61a0fa0aa /src/liballoc
parent73f08719ea4cad8b8e9461bfb6d3b0ae088d2795 (diff)
parentb647583c2df155f4741fa2b3e1fa6e4fb1f5868f (diff)
downloadrust-135f334e0a3177146f7417cee7ceaf405ffe732d.tar.gz
rust-135f334e0a3177146f7417cee7ceaf405ffe732d.zip
Auto merge of #49580 - glandium:core-heap, r=SimonSapin
Use Alloc and Layout from core::heap.

94d1970bba87f2d2893f6e934e4c3f02ed50604d moved the alloc::allocator
module to core::heap, moving e.g. Alloc and Layout out of the alloc
crate. While alloc::heap reexports them, it's better to use them from
where they really come from.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/arc.rs3
-rw-r--r--src/liballoc/boxed.rs3
-rw-r--r--src/liballoc/btree/node.rs3
-rw-r--r--src/liballoc/raw_vec.rs3
-rw-r--r--src/liballoc/rc.rs3
5 files changed, 10 insertions, 5 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index 6a77bf64bae..ccf2e2768d1 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -21,6 +21,7 @@ use core::sync::atomic::Ordering::{Acquire, Relaxed, Release, SeqCst};
 use core::borrow;
 use core::fmt;
 use core::cmp::Ordering;
+use core::heap::{Alloc, Layout};
 use core::intrinsics::abort;
 use core::mem::{self, align_of_val, size_of_val, uninitialized};
 use core::ops::Deref;
@@ -31,7 +32,7 @@ use core::hash::{Hash, Hasher};
 use core::{isize, usize};
 use core::convert::From;
 
-use heap::{Heap, Alloc, Layout, box_free};
+use heap::{Heap, box_free};
 use boxed::Box;
 use string::String;
 use vec::Vec;
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index fdc3ef4efb8..e59a6e9fdea 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -55,7 +55,7 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
-use heap::{Heap, Layout, Alloc};
+use heap::Heap;
 use raw_vec::RawVec;
 
 use core::any::Any;
@@ -63,6 +63,7 @@ use core::borrow;
 use core::cmp::Ordering;
 use core::fmt;
 use core::hash::{Hash, Hasher};
+use core::heap::{Alloc, Layout};
 use core::iter::FusedIterator;
 use core::marker::{self, Unpin, Unsize};
 use core::mem::{self, Pin};
diff --git a/src/liballoc/btree/node.rs b/src/liballoc/btree/node.rs
index 464f8f2f4ec..49109d522e9 100644
--- a/src/liballoc/btree/node.rs
+++ b/src/liballoc/btree/node.rs
@@ -41,13 +41,14 @@
 // - A node of length `n` has `n` keys, `n` values, and (in an internal node) `n + 1` edges.
 //   This implies that even an empty internal node has at least one edge.
 
+use core::heap::{Alloc, Layout};
 use core::marker::PhantomData;
 use core::mem;
 use core::ptr::{self, Unique, NonNull};
 use core::slice;
 
 use boxed::Box;
-use heap::{Heap, Alloc, Layout};
+use heap::Heap;
 
 const B: usize = 6;
 pub const MIN_LEN: usize = B - 1;
diff --git a/src/liballoc/raw_vec.rs b/src/liballoc/raw_vec.rs
index 229ae54d747..3edce8aebdf 100644
--- a/src/liballoc/raw_vec.rs
+++ b/src/liballoc/raw_vec.rs
@@ -9,11 +9,12 @@
 // except according to those terms.
 
 use core::cmp;
+use core::heap::{Alloc, Layout};
 use core::mem;
 use core::ops::Drop;
 use core::ptr::{self, Unique};
 use core::slice;
-use heap::{Alloc, Layout, Heap};
+use heap::Heap;
 use super::boxed::Box;
 use super::allocator::CollectionAllocErr;
 use super::allocator::CollectionAllocErr::*;
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 1fa5d34cb57..8bdc57f96a6 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -250,6 +250,7 @@ use core::cell::Cell;
 use core::cmp::Ordering;
 use core::fmt;
 use core::hash::{Hash, Hasher};
+use core::heap::{Alloc, Layout};
 use core::intrinsics::abort;
 use core::marker;
 use core::marker::{Unsize, PhantomData};
@@ -259,7 +260,7 @@ use core::ops::CoerceUnsized;
 use core::ptr::{self, NonNull};
 use core::convert::From;
 
-use heap::{Heap, Alloc, Layout, box_free};
+use heap::{Heap, box_free};
 use string::String;
 use vec::Vec;