diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2014-09-15 16:31:32 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2014-09-15 18:16:33 -0400 |
| commit | d206f05132566a4ae1974e7a3d892ab5788616cd (patch) | |
| tree | 887ea4a37d4e8bb93420cbf129358b265e2d361d /src/liballoc | |
| parent | 84b37374bf31b463c36f70123e870f52db19c740 (diff) | |
remove the closure_exchange_malloc lang item
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/heap.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs index b6c255e7930..f1780b07271 100644 --- a/src/liballoc/heap.rs +++ b/src/liballoc/heap.rs @@ -10,7 +10,7 @@ // FIXME: #13996: mark the `allocate` and `reallocate` return value as `noalias` -#[cfg(not(test))] use core::raw; +#[cfg(stage0, not(test))] use core::raw; #[cfg(stage0, not(test))] use util; /// Returns a pointer to `size` bytes of memory. @@ -111,7 +111,6 @@ unsafe fn exchange_free(ptr: *mut u8, size: uint, align: uint) { deallocate(ptr, size, align); } -// FIXME: #7496 #[cfg(stage0, not(test))] #[lang="closure_exchange_malloc"] #[inline] @@ -127,21 +126,6 @@ unsafe fn closure_exchange_malloc(drop_glue: fn(*mut u8), size: uint, alloc as *mut u8 } -// FIXME: #7496 -#[cfg(not(stage0), not(test))] -#[lang="closure_exchange_malloc"] -#[inline] -#[allow(deprecated)] -unsafe fn closure_exchange_malloc(drop_glue: fn(*mut u8), size: uint, - align: uint) -> *mut u8 { - let p = allocate(size, align); - - let alloc = p as *mut raw::Box<()>; - (*alloc).drop_glue = drop_glue; - - alloc as *mut u8 -} - // The minimum alignment guaranteed by the architecture. This value is used to // add fast paths for low alignment values. In practice, the alignment is a // constant at the call site and the branch will be optimized out. |
