From b647583c2df155f4741fa2b3e1fa6e4fb1f5868f Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Mon, 2 Apr 2018 16:05:30 +0900 Subject: Use Alloc and Layout from core::heap. 94d1970bba87f2d2893f6e934e4c3f02ed50604d moved the alloc::allocator module to core::heap, moving e.g. Alloc and Layout out of the alloc crate. While alloc::heap reexports them, it's better to use them from where they really come from. --- src/liballoc_system/lib.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/liballoc_system') diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index 1d5e7b73be5..6c1e9cb0b9c 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -17,7 +17,6 @@ issue = "32838")] #![feature(global_allocator)] #![feature(allocator_api)] -#![feature(alloc)] #![feature(core_intrinsics)] #![feature(staged_api)] #![feature(rustc_attrs)] @@ -43,9 +42,7 @@ const MIN_ALIGN: usize = 8; #[allow(dead_code)] const MIN_ALIGN: usize = 16; -extern crate alloc; - -use self::alloc::heap::{Alloc, AllocErr, Layout, Excess, CannotReallocInPlace}; +use core::heap::{Alloc, AllocErr, Layout, Excess, CannotReallocInPlace}; #[unstable(feature = "allocator_api", issue = "32838")] pub struct System; @@ -125,7 +122,7 @@ mod platform { use MIN_ALIGN; use System; - use alloc::heap::{Alloc, AllocErr, Layout}; + use core::heap::{Alloc, AllocErr, Layout}; #[unstable(feature = "allocator_api", issue = "32838")] unsafe impl<'a> Alloc for &'a System { @@ -279,7 +276,7 @@ mod platform { use MIN_ALIGN; use System; - use alloc::heap::{Alloc, AllocErr, Layout, CannotReallocInPlace}; + use core::heap::{Alloc, AllocErr, Layout, CannotReallocInPlace}; type LPVOID = *mut u8; type HANDLE = LPVOID; @@ -491,7 +488,7 @@ mod platform { mod platform { extern crate dlmalloc; - use alloc::heap::{Alloc, AllocErr, Layout, Excess, CannotReallocInPlace}; + use core::heap::{Alloc, AllocErr, Layout, Excess, CannotReallocInPlace}; use System; use self::dlmalloc::GlobalDlmalloc; -- cgit 1.4.1-3-g733a5