File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change 11use crate :: ptr;
22use crate :: sys_common:: alloc:: { MIN_ALIGN , realloc_fallback} ;
33use crate :: alloc:: { GlobalAlloc , Layout , System } ;
4- use crate :: mem;
54
65#[ stable( feature = "alloc_system_type" , since = "1.28.0" ) ]
76unsafe impl GlobalAlloc for System {
@@ -88,7 +87,7 @@ unsafe fn aligned_malloc(layout: &Layout) -> *mut u8 {
8887 let mut out = ptr:: null_mut ( ) ;
8988 // posix_memalign requires that the alignment be a multiple of `sizeof(void*)`.
9089 // Since these are all powers of 2, we can just use max.
91- let align = layout. align ( ) . max ( mem:: size_of :: < usize > ( ) ) ;
90+ let align = layout. align ( ) . max ( crate :: mem:: size_of :: < usize > ( ) ) ;
9291 let ret = libc:: posix_memalign ( & mut out, align, layout. size ( ) ) ;
9392 if ret != 0 {
9493 ptr:: null_mut ( )
You can’t perform that action at this time.
0 commit comments