Use Alloc and Layout from core::heap.
94d1970bba 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.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user