… to make the name `alloc` available.
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};
// 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::*;
#[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;
}
#[unstable(feature = "try_reserve", reason = "new API", issue="48043")]
-pub use alloc::allocator::CollectionAllocErr;
+pub use heap::CollectionAllocErr;
mod hash;
// coherence challenge (e.g., specialization, neg impls, etc) we can
// reconsider what crate these items belong in.
-use alloc::allocator;
use any::TypeId;
use borrow::Cow;
use cell;
use char;
use core::array;
use fmt::{self, Debug, Display};
+use heap::{AllocErr, CannotReallocInPlace};
use mem::transmute;
use num;
use str;
#[unstable(feature = "allocator_api",
reason = "the precise API and guarantees it provides may be tweaked.",
issue = "32838")]
-impl Error for allocator::AllocErr {
+impl Error for AllocErr {
fn description(&self) -> &str {
- allocator::AllocErr::description(self)
+ AllocErr::description(self)
}
}
#[unstable(feature = "allocator_api",
reason = "the precise API and guarantees it provides may be tweaked.",
issue = "32838")]
-impl Error for allocator::CannotReallocInPlace {
+impl Error for CannotReallocInPlace {
fn description(&self) -> &str {
- allocator::CannotReallocInPlace::description(self)
+ CannotReallocInPlace::description(self)
}
}
#![unstable(issue = "32838", feature = "allocator_api")]
-pub use alloc::heap::Heap;
+pub use alloc_crate::heap::Heap;
pub use alloc_system::System;
#[doc(inline)] pub use core::heap::*;
#[macro_use]
#[macro_reexport(vec, format)]
-extern crate alloc;
+extern crate alloc as alloc_crate;
extern crate alloc_system;
#[doc(masked)]
extern crate libc;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::u64;
#[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::boxed;
+pub use alloc_crate::boxed;
#[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::rc;
+pub use alloc_crate::rc;
#[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::borrow;
+pub use alloc_crate::borrow;
#[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::fmt;
+pub use alloc_crate::fmt;
#[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::slice;
+pub use alloc_crate::slice;
#[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::str;
+pub use alloc_crate::str;
#[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::string;
+pub use alloc_crate::string;
#[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::vec;
+pub use alloc_crate::vec;
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::char;
#[stable(feature = "i128", since = "1.26.0")]
#![stable(feature = "rust1", since = "1.0.0")]
#[stable(feature = "rust1", since = "1.0.0")]
-pub use alloc::arc::{Arc, Weak};
+pub use alloc_crate::arc::{Arc, Weak};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::sync::atomic;
pub use self::PopResult::*;
-use alloc::boxed::Box;
use core::ptr;
use core::cell::UnsafeCell;
-
+use boxed::Box;
use sync::atomic::{AtomicPtr, Ordering};
/// A result of the `pop` function.
// http://www.1024cores.net/home/lock-free-algorithms/queues/unbounded-spsc-queue
-use alloc::boxed::Box;
+use boxed::Box;
use core::ptr;
use core::cell::UnsafeCell;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use alloc::boxed::FnBox;
+use boxed::FnBox;
use cmp;
use ffi::CStr;
use io;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use alloc::boxed::FnBox;
+use boxed::FnBox;
use ffi::CStr;
use io;
use mem;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use alloc::boxed::FnBox;
+use boxed::FnBox;
use cmp;
use ffi::CStr;
use io;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use alloc::boxed::FnBox;
+use boxed::FnBox;
use ffi::CStr;
use io;
use sys::{unsupported, Void};
use sys::cvt;
use sys_common::{AsInner, FromInner, IntoInner};
use sys_common::process::{CommandEnv, EnvKey};
-use alloc::borrow::Borrow;
+use borrow::Borrow;
////////////////////////////////////////////////////////////////////////////////
// Command
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use alloc::boxed::FnBox;
+use boxed::FnBox;
use io;
use ffi::CStr;
use mem;
//!
//! Documentation can be found on the `rt::at_exit` function.
-use alloc::boxed::FnBox;
+use boxed::FnBox;
use ptr;
use sys_common::mutex::Mutex;
use ffi::{OsStr, OsString};
use env;
use collections::BTreeMap;
-use alloc::borrow::Borrow;
+use borrow::Borrow;
pub trait EnvKey:
From<OsString> + Into<OsString> +
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use alloc::boxed::FnBox;
+use boxed::FnBox;
use env;
use sync::atomic::{self, Ordering};
use sys::stack_overflow;