about summary refs log tree commit diff
path: root/src/libstd/collections
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-04-03 14:36:57 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-04-12 22:52:47 +0200
commit1b895d8b88413f72230fbc0f00c67328870a2e9a (patch)
treeb17feb40084b23db85ca8d5e9667e0f7f0d6315f /src/libstd/collections
parentc660cedc02e125fe47d90075837c5d8adeb4c097 (diff)
downloadrust-1b895d8b88413f72230fbc0f00c67328870a2e9a.tar.gz
rust-1b895d8b88413f72230fbc0f00c67328870a2e9a.zip
Import the `alloc` crate as `alloc_crate` in std
… to make the name `alloc` available.
Diffstat (limited to 'src/libstd/collections')
-rw-r--r--src/libstd/collections/hash/map.rs4
-rw-r--r--src/libstd/collections/hash/table.rs5
-rw-r--r--src/libstd/collections/mod.rs10
3 files changed, 7 insertions, 12 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index e0b48e565d0..73a5df8dc28 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -11,15 +11,13 @@
 use self::Entry::*;
 use self::VacantEntryState::*;
 
-use alloc::heap::Heap;
-use alloc::allocator::CollectionAllocErr;
 use cell::Cell;
-use core::heap::Alloc;
 use borrow::Borrow;
 use cmp::max;
 use fmt::{self, Debug};
 #[allow(deprecated)]
 use hash::{Hash, Hasher, BuildHasher, SipHasher13};
+use heap::{Heap, Alloc, CollectionAllocErr};
 use iter::{FromIterator, FusedIterator};
 use mem::{self, replace};
 use ops::{Deref, Index};
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs
index fa6053d3f6d..878cd82a258 100644
--- a/src/libstd/collections/hash/table.rs
+++ b/src/libstd/collections/hash/table.rs
@@ -8,17 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use alloc::heap::Heap;
-use core::heap::{Alloc, Layout};
-
 use cmp;
 use hash::{BuildHasher, Hash, Hasher};
+use heap::{Heap, Alloc, Layout, CollectionAllocErr};
 use marker;
 use mem::{align_of, size_of, needs_drop};
 use mem;
 use ops::{Deref, DerefMut};
 use ptr::{self, Unique, NonNull};
-use alloc::allocator::CollectionAllocErr;
 
 use self::BucketState::*;
 
diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs
index c7ad27d8d26..9cf73824dea 100644
--- a/src/libstd/collections/mod.rs
+++ b/src/libstd/collections/mod.rs
@@ -424,13 +424,13 @@
 #[doc(hidden)]
 pub use ops::Bound;
 #[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::{BinaryHeap, BTreeMap, BTreeSet};
+pub use alloc_crate::{BinaryHeap, BTreeMap, BTreeSet};
 #[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::{LinkedList, VecDeque};
+pub use alloc_crate::{LinkedList, VecDeque};
 #[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::{binary_heap, btree_map, btree_set};
+pub use alloc_crate::{binary_heap, btree_map, btree_set};
 #[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::{linked_list, vec_deque};
+pub use alloc_crate::{linked_list, vec_deque};
 
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use self::hash_map::HashMap;
@@ -446,7 +446,7 @@ pub mod range {
 }
 
 #[unstable(feature = "try_reserve", reason = "new API", issue="48043")]
-pub use alloc::allocator::CollectionAllocErr;
+pub use heap::CollectionAllocErr;
 
 mod hash;