We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45e7ba9 commit 2e47fc3Copy full SHA for 2e47fc3
src/libstd/sys/unix/alloc.rs
@@ -1,7 +1,6 @@
1
use crate::ptr;
2
use crate::sys_common::alloc::{MIN_ALIGN, realloc_fallback};
3
use crate::alloc::{GlobalAlloc, Layout, System};
4
-use crate::mem;
5
6
#[stable(feature = "alloc_system_type", since = "1.28.0")]
7
unsafe impl GlobalAlloc for System {
@@ -88,7 +87,7 @@ unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
88
87
let mut out = ptr::null_mut();
89
// posix_memalign requires that the alignment be a multiple of `sizeof(void*)`.
90
// Since these are all powers of 2, we can just use max.
91
- let align = layout.align().max(mem::size_of::<usize>());
+ let align = layout.align().max(crate::mem::size_of::<usize>());
92
let ret = libc::posix_memalign(&mut out, align, layout.size());
93
if ret != 0 {
94
ptr::null_mut()
0 commit comments