@@ -8,10 +8,10 @@ pub(crate) use self::inner::{Allocator, Global, do_alloc};
88// This is used when building for `std`.
99#[ cfg( feature = "nightly" ) ]
1010mod inner {
11+ use core:: alloc:: Layout ;
1112 use core:: ptr:: NonNull ;
1213 #[ cfg( test) ]
1314 pub ( crate ) use stdalloc:: alloc:: AllocError ;
14- use stdalloc:: alloc:: Layout ;
1515 pub ( crate ) use stdalloc:: alloc:: { Allocator , Global } ;
1616
1717 pub ( crate ) fn do_alloc < A : Allocator > ( alloc : & A , layout : Layout ) -> Result < NonNull < [ u8 ] > , ( ) > {
@@ -33,8 +33,8 @@ mod inner {
3333 #[ cfg( test) ]
3434 pub ( crate ) use allocator_api2:: alloc:: AllocError ;
3535 pub ( crate ) use allocator_api2:: alloc:: { Allocator , Global } ;
36+ use core:: alloc:: Layout ;
3637 use core:: ptr:: NonNull ;
37- use stdalloc:: alloc:: Layout ;
3838
3939 pub ( crate ) fn do_alloc < A : Allocator > ( alloc : & A , layout : Layout ) -> Result < NonNull < [ u8 ] > , ( ) > {
4040 match alloc. allocate ( layout) {
@@ -54,8 +54,9 @@ mod inner {
5454// or `nightly` without disturbing users that don't want to use it.
5555#[ cfg( not( any( feature = "nightly" , feature = "allocator-api2" ) ) ) ]
5656mod inner {
57+ use core:: alloc:: Layout ;
5758 use core:: ptr:: NonNull ;
58- use stdalloc:: alloc:: { Layout , alloc, dealloc} ;
59+ use stdalloc:: alloc:: { alloc, dealloc} ;
5960
6061 #[ expect( clippy:: missing_safety_doc) ] // not exposed outside of this crate
6162 pub unsafe trait Allocator {
0 commit comments