Skip to content

Commit 09e8db1

Browse files
committed
Rename heap modules in the core, alloc, and std crates to alloc
1 parent 1b895d8 commit 09e8db1

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed
File renamed without changes.

src/liballoc/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
//!
5858
//! ## Heap interfaces
5959
//!
60-
//! The [`heap`](heap/index.html) module defines the low-level interface to the
60+
//! The [`alloc`](alloc/index.html) module defines the low-level interface to the
6161
//! default global allocator. It is not compatible with the libc allocator API.
6262
6363
#![allow(unused_attributes)]
@@ -145,7 +145,11 @@ pub use core::heap as allocator;
145145

146146
// Heaps provided for low-level allocation strategies
147147

148-
pub mod heap;
148+
pub mod alloc;
149+
150+
#[unstable(feature = "allocator_api", issue = "32838")]
151+
#[rustc_deprecated(since = "1.27.0", reason = "module renamed to `alloc`")]
152+
pub use alloc as heap;
149153

150154
// Primitive types using the heaps above
151155

File renamed without changes.

src/libcore/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ pub mod unicode;
185185

186186
/* Heap memory allocator trait */
187187
#[allow(missing_docs)]
188-
pub mod heap;
188+
pub mod alloc;
189+
190+
#[unstable(feature = "allocator_api", issue = "32838")]
191+
#[rustc_deprecated(since = "1.27.0", reason = "module renamed to `alloc`")]
192+
pub use alloc as heap;
189193

190194
// note: does not need to be public
191195
mod iter_private;
File renamed without changes.

src/libstd/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,11 @@ pub mod path;
477477
pub mod process;
478478
pub mod sync;
479479
pub mod time;
480-
pub mod heap;
480+
pub mod alloc;
481+
482+
#[unstable(feature = "allocator_api", issue = "32838")]
483+
#[rustc_deprecated(since = "1.27.0", reason = "module renamed to `alloc`")]
484+
pub use alloc as heap;
481485

482486
// Platform-abstraction modules
483487
#[macro_use]

0 commit comments

Comments
 (0)