1
Fork 0

Separate alloc::heap::Alloc trait for stage0 #[global_allocator]

This commit is contained in:
Simon Sapin 2018-04-03 20:58:50 +02:00
parent e521b8b472
commit 5e5a0c21fc
8 changed files with 109 additions and 14 deletions

View file

@ -153,10 +153,16 @@ pub mod alloc;
#[unstable(feature = "allocator_api", issue = "32838")]
#[rustc_deprecated(since = "1.27.0", reason = "module renamed to `alloc`")]
/// Use the `alloc` module instead.
#[cfg(not(stage0))]
pub mod heap {
pub use alloc::*;
}
#[unstable(feature = "allocator_api", issue = "32838")]
#[rustc_deprecated(since = "1.27.0", reason = "module renamed to `alloc`")]
#[cfg(stage0)]
pub mod heap;
// Primitive types using the heaps above
// Need to conditionally define the mod from `boxed.rs` to avoid