Skip to content

Commit

Permalink
fix a warning when building core tests with cfg(miri)
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Mar 3, 2022
1 parent 32cbc76 commit d233570
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/core/tests/slice.rs
Expand Up @@ -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 _
Expand Down

0 comments on commit d233570

Please sign in to comment.