diff options
| author | Ralf Jung <post@ralfj.de> | 2019-07-03 22:45:27 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-07-03 22:48:17 +0200 |
| commit | 2e47fc3bcd46e548d7168e2ba631b3dfa8464d01 (patch) | |
| tree | 89dea6577a8aae62335b4d78ca034feaa125d567 | |
| parent | 45e7ba96cb9e5cc018f213f15a2c71f4e1350424 (diff) | |
| download | rust-2e47fc3bcd46e548d7168e2ba631b3dfa8464d01.tar.gz rust-2e47fc3bcd46e548d7168e2ba631b3dfa8464d01.zip | |
fix unused-import error on android
| -rw-r--r-- | src/libstd/sys/unix/alloc.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/alloc.rs b/src/libstd/sys/unix/alloc.rs index 4ac66230e6e..2c2dd3b77ea 100644 --- a/src/libstd/sys/unix/alloc.rs +++ b/src/libstd/sys/unix/alloc.rs @@ -1,7 +1,6 @@ use crate::ptr; use crate::sys_common::alloc::{MIN_ALIGN, realloc_fallback}; use crate::alloc::{GlobalAlloc, Layout, System}; -use crate::mem; #[stable(feature = "alloc_system_type", since = "1.28.0")] unsafe impl GlobalAlloc for System { @@ -88,7 +87,7 @@ unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 { let mut out = ptr::null_mut(); // posix_memalign requires that the alignment be a multiple of `sizeof(void*)`. // Since these are all powers of 2, we can just use max. - let align = layout.align().max(mem::size_of::<usize>()); + let align = layout.align().max(crate::mem::size_of::<usize>()); let ret = libc::posix_memalign(&mut out, align, layout.size()); if ret != 0 { ptr::null_mut() |
