Skip to content

Commit 1699839

Browse files
committed
test: fix feature requirements
1 parent 091e23e commit 1699839

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/map.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6515,14 +6515,19 @@ mod test_map {
65156515
}
65166516
}
65176517

6518-
#[cfg(all(test, unix))]
6518+
#[cfg(all(test, unix, any(feature = "nightly", feature = "allocator-api2")))]
65196519
mod test_map_with_mmap_allocations {
65206520
use super::HashMap;
65216521
use crate::raw::prev_pow2;
6522-
use allocator_api2::alloc::{AllocError, Allocator};
65236522
use core::alloc::Layout;
65246523
use core::ptr::{null_mut, NonNull};
65256524

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+
65266531
/// This is not a production quality allocator, just good enough for
65276532
/// some basic tests.
65286533
#[derive(Clone, Copy, Debug)]

0 commit comments

Comments
 (0)