Separate alloc::heap::Alloc trait for stage0 #[global_allocator]
This commit is contained in:
parent
e521b8b472
commit
5e5a0c21fc
8 changed files with 109 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue