From d233570fab08281f50ad1edbe82c5d404a9e3e1d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 3 Mar 2022 14:52:01 -0500 Subject: [PATCH] fix a warning when building core tests with cfg(miri) --- library/core/tests/slice.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/core/tests/slice.rs b/library/core/tests/slice.rs index 06a30d7096c..7c4d2f266f9 100644 --- a/library/core/tests/slice.rs +++ b/library/core/tests/slice.rs @@ -2457,9 +2457,11 @@ take_tests! { (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 _