Skip to content

Commit da752b6

Browse files
committed
avec_retain.rs: fix build-thorough (tests assumed alloc was available)
1 parent 0d5996c commit da752b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vec/avec_retain.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ impl<T> Drop for RemoveHoleOnDrop<'_, T> {
5252

5353

5454

55-
#[test] fn retain() {
55+
#[cfg(feature = "alloc")] #[test] fn retain() {
5656
let mut v = AVec::<u32, crate::allocator::alloc::Global>::new();
5757
v.try_extend_from_slice(&[1, 2, 3, 4, 5]).unwrap();
5858
v.retain(|x| *x % 2 == 0);
5959
assert_eq!(v[..], [2, 4]);
6060
}
6161

62-
#[test] fn retain_drop() {
62+
#[cfg(feature = "alloc")] #[test] fn retain_drop() {
6363
use crate::util::drop::Tester;
6464

6565
let mut v = AVec::<Tester, crate::allocator::alloc::Global>::new();

0 commit comments

Comments
 (0)