Skip to content

Commit b11d880

Browse files
committedDec 2, 2021
disable tests in Miri that take too long
1 parent 76938d6 commit b11d880

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎library/core/tests/slice.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2330,13 +2330,15 @@ macro_rules! empty_max_mut {
23302330
};
23312331
}
23322332

2333+
#[cfg(not(miri))] // Comparing usize::MAX many elements takes forever in Miri (and in rustc without optimizations)
23332334
take_tests! {
23342335
slice: &[(); usize::MAX], method: take,
23352336
(take_in_bounds_max_range_to, (..usize::MAX), Some(EMPTY_MAX), &[(); 0]),
23362337
(take_oob_max_range_to_inclusive, (..=usize::MAX), None, EMPTY_MAX),
23372338
(take_in_bounds_max_range_from, (usize::MAX..), Some(&[] as _), EMPTY_MAX),
23382339
}
23392340

2341+
#[cfg(not(miri))] // Comparing usize::MAX many elements takes forever in Miri (and in rustc without optimizations)
23402342
take_tests! {
23412343
slice: &mut [(); usize::MAX], method: take_mut,
23422344
(take_mut_in_bounds_max_range_to, (..usize::MAX), Some(empty_max_mut!()), &mut [(); 0]),

0 commit comments

Comments
 (0)