From: Jethro Beekman Date: Wed, 10 Apr 2019 21:08:54 +0000 (-0700) Subject: SGX target: fix cfg(test) build X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=e2d1d667e283de5183822b333cb3a5e08def9874;hp=96d700f1b7bc9c53fa0d11567adb1ed2c1c27e79;p=rust.git SGX target: fix cfg(test) build --- diff --git a/src/libstd/sys/sgx/alloc.rs b/src/libstd/sys/sgx/alloc.rs index b385d567dd8..40daec758a9 100644 --- a/src/libstd/sys/sgx/alloc.rs +++ b/src/libstd/sys/sgx/alloc.rs @@ -1,4 +1,4 @@ -use crate::alloc::{self, GlobalAlloc, Layout, System}; +use crate::alloc::{GlobalAlloc, Layout, System}; use super::waitqueue::SpinMutex; @@ -36,11 +36,11 @@ unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut #[cfg(not(test))] #[no_mangle] pub unsafe extern "C" fn __rust_c_alloc(size: usize, align: usize) -> *mut u8 { - alloc::alloc(Layout::from_size_align_unchecked(size, align)) + crate::alloc::alloc(Layout::from_size_align_unchecked(size, align)) } #[cfg(not(test))] #[no_mangle] pub unsafe extern "C" fn __rust_c_dealloc(ptr: *mut u8, size: usize, align: usize) { - alloc::dealloc(ptr, Layout::from_size_align_unchecked(size, align)) + crate::alloc::dealloc(ptr, Layout::from_size_align_unchecked(size, align)) }