Skip to content

Commit e2d1d66

Browse files
author
Jethro Beekman
committed
SGX target: fix cfg(test) build
1 parent 96d700f commit e2d1d66

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/sys/sgx/alloc.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::alloc::{self, GlobalAlloc, Layout, System};
1+
use crate::alloc::{GlobalAlloc, Layout, System};
22

33
use super::waitqueue::SpinMutex;
44

@@ -36,11 +36,11 @@ unsafe impl GlobalAlloc for System {
3636
#[cfg(not(test))]
3737
#[no_mangle]
3838
pub unsafe extern "C" fn __rust_c_alloc(size: usize, align: usize) -> *mut u8 {
39-
alloc::alloc(Layout::from_size_align_unchecked(size, align))
39+
crate::alloc::alloc(Layout::from_size_align_unchecked(size, align))
4040
}
4141

4242
#[cfg(not(test))]
4343
#[no_mangle]
4444
pub unsafe extern "C" fn __rust_c_dealloc(ptr: *mut u8, size: usize, align: usize) {
45-
alloc::dealloc(ptr, Layout::from_size_align_unchecked(size, align))
45+
crate::alloc::dealloc(ptr, Layout::from_size_align_unchecked(size, align))
4646
}

0 commit comments

Comments
 (0)