about summary refs log tree commit diff
path: root/src/liballoc/alloc.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-04-03 21:15:06 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-04-12 22:52:47 +0200
commite521b8b472dfe058f6d0f62f2e1ab5f291c220ee (patch)
treeb7bd74b0b572fc7143fd783a6e912b4d1ebbf1cc /src/liballoc/alloc.rs
parent88ebd2d752831860d8824849cf6f5ae656a2c3eb (diff)
downloadrust-e521b8b472dfe058f6d0f62f2e1ab5f291c220ee.tar.gz
rust-e521b8b472dfe058f6d0f62f2e1ab5f291c220ee.zip
Actually deprecate the Heap type
Diffstat (limited to 'src/liballoc/alloc.rs')
-rw-r--r--src/liballoc/alloc.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/liballoc/alloc.rs b/src/liballoc/alloc.rs
index 1bd95cfd08c..12ee7701903 100644
--- a/src/liballoc/alloc.rs
+++ b/src/liballoc/alloc.rs
@@ -81,8 +81,12 @@ pub struct Global;
 
 #[unstable(feature = "allocator_api", issue = "32838")]
 #[rustc_deprecated(since = "1.27.0", reason = "type renamed to `Global`")]
-pub use self::Global as Heap;
+pub type Heap = Global;
 
+#[unstable(feature = "allocator_api", issue = "32838")]
+#[rustc_deprecated(since = "1.27.0", reason = "type renamed to `Global`")]
+#[allow(non_upper_case_globals)]
+pub const Heap: Global = Global;
 
 unsafe impl Alloc for Global {
     #[inline]
@@ -268,7 +272,7 @@ mod tests {
     extern crate test;
     use self::test::Bencher;
     use boxed::Box;
-    use heap::{Global, Alloc, Layout};
+    use alloc::{Global, Alloc, Layout};
 
     #[test]
     fn allocate_zeroed() {