diff --git a/src/util/alloc/free_list_allocator.rs b/src/util/alloc/free_list_allocator.rs index b443fe0c6a..2bf4fc700c 100644 --- a/src/util/alloc/free_list_allocator.rs +++ b/src/util/alloc/free_list_allocator.rs @@ -422,7 +422,8 @@ impl FreeListAllocator { let unswept = self.unswept_blocks.get_mut(bin).unwrap(); // If we do eager sweeping, we should have no unswept blocks. - debug_assert!(!cfg!(feature = "eager_sweeping") || unswept.is_empty()); + #[cfg(feature = "eager_sweeping")] + debug_assert!(unswept.is_empty()); let mut sweep_later = |list: &mut BlockList| { list.release_blocks(self.space); diff --git a/src/util/test_util/mock_vm.rs b/src/util/test_util/mock_vm.rs index cc687f4b1f..7dc97b1448 100644 --- a/src/util/test_util/mock_vm.rs +++ b/src/util/test_util/mock_vm.rs @@ -56,13 +56,19 @@ macro_rules! lifetime { /// Call `MockMethod`. macro_rules! mock { ($fn: ident($($arg:expr),*)) => { - write_mockvm(|mock| mock.$fn.call(($($arg),*))) + { + let arg_tuple = ($($arg),*); + write_mockvm(|mock| mock.$fn.call(arg_tuple)) + } }; } /// Call `MockAny`. macro_rules! mock_any { ($fn: ident($($arg:expr),*)) => { - *write_mockvm(|mock| mock.$fn.call_any(Box::new(($($arg),*)))).downcast().unwrap() + { + let arg_tuple = ($($arg),*); + *write_mockvm(|mock| mock.$fn.call_any(Box::new(arg_tuple))).downcast().unwrap() + } }; }