File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -6515,14 +6515,19 @@ mod test_map {
6515
6515
}
6516
6516
}
6517
6517
6518
- #[ cfg( all( test, unix) ) ]
6518
+ #[ cfg( all( test, unix, any ( feature = "nightly" , feature = "allocator-api2" ) ) ) ]
6519
6519
mod test_map_with_mmap_allocations {
6520
6520
use super :: HashMap ;
6521
6521
use crate :: raw:: prev_pow2;
6522
- use allocator_api2:: alloc:: { AllocError , Allocator } ;
6523
6522
use core:: alloc:: Layout ;
6524
6523
use core:: ptr:: { null_mut, NonNull } ;
6525
6524
6525
+ #[ cfg( feature = "nightly" ) ]
6526
+ use core:: alloc:: { AllocError , Allocator } ;
6527
+
6528
+ #[ cfg( all( feature = "allocator-api2" , not( feature = "nightly" ) ) ) ]
6529
+ use allocator_api2:: alloc:: { AllocError , Allocator } ;
6530
+
6526
6531
/// This is not a production quality allocator, just good enough for
6527
6532
/// some basic tests.
6528
6533
#[ derive( Clone , Copy , Debug ) ]
You can’t perform that action at this time.
0 commit comments