about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2018-04-02 16:05:30 +0900
committerMike Hommey <mh@glandium.org>2018-04-02 16:06:19 +0900
commitb647583c2df155f4741fa2b3e1fa6e4fb1f5868f (patch)
tree327ff3a0824d5089fcf941a635e475b358958b65 /src/libstd
parent06fa27d7c84a21af8449e06f3c50b243c4d5a7ad (diff)
downloadrust-b647583c2df155f4741fa2b3e1fa6e4fb1f5868f.tar.gz
rust-b647583c2df155f4741fa2b3e1fa6e4fb1f5868f.zip
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/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs3
-rw-r--r--src/libstd/collections/hash/table.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 474999a6646..452fa4e471c 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -11,9 +11,10 @@
 use self::Entry::*;
 use self::VacantEntryState::*;
 
-use alloc::heap::{Heap, Alloc};
+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};
diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs
index 8e78dc546c6..c6861c82a23 100644
--- a/src/libstd/collections/hash/table.rs
+++ b/src/libstd/collections/hash/table.rs
@@ -8,7 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use alloc::heap::{Heap, Alloc, Layout};
+use alloc::heap::Heap;
+use core::heap::{Alloc, Layout};
 
 use cmp;
 use hash::{BuildHasher, Hash, Hasher};