fix a warning when building core tests with cfg(miri)

This commit is contained in:
Ralf Jung 2022-03-03 14:52:01 -05:00
parent 32cbc7630b
commit d233570fab

View File

@ -2457,9 +2457,11 @@ fn $test_name() {
(take_last_mut_empty, (), None, &mut []),
}
#[cfg(not(miri))] // unused in Miri
const EMPTY_MAX: &'static [()] = &[(); usize::MAX];
// can't be a constant due to const mutability rules
#[cfg(not(miri))] // unused in Miri
macro_rules! empty_max_mut {
() => {
&mut [(); usize::MAX] as _