Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0612568

Browse files
committedApr 24, 2020
Auto merge of #71509 - Dylan-DPC:rollup-n8s37rm, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #71235 (Tweak `'static` suggestion code) - #71318 (miri-unleash tests: ensure they fire even with 'allow(const_err)') - #71428 (Let compiletest recognize gdb 10.x) - #71475 (Miri Frame: use mir::Location to represent position in function) - #71476 (more compact way to adjust test sizes for Miri) Failed merges: r? @ghost
2 parents 0b95879 + 08ca447 commit 0612568

File tree

55 files changed

+829
-498
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+829
-498
lines changed
 

‎src/liballoc/collections/vec_deque/tests.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,8 @@ fn test_vec_from_vecdeque() {
386386
assert!(vec.into_iter().eq(vd));
387387
}
388388

389-
#[cfg(not(miri))] // Miri is too slow
390-
let max_pwr = 7;
391-
#[cfg(miri)]
392-
let max_pwr = 5;
389+
// Miri is too slow
390+
let max_pwr = if cfg!(miri) { 5 } else { 7 };
393391

394392
for cap_pwr in 0..max_pwr {
395393
// Make capacity as a (2^x)-1, so that the ring size is 2^x

‎src/liballoc/tests/binary_heap.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,16 +409,14 @@ fn panic_safe() {
409409
}
410410
let mut rng = thread_rng();
411411
const DATASZ: usize = 32;
412-
#[cfg(not(miri))] // Miri is too slow
413-
const NTEST: usize = 10;
414-
#[cfg(miri)]
415-
const NTEST: usize = 1;
412+
// Miri is too slow
413+
let ntest = if cfg!(miri) { 1 } else { 10 };
416414

417415
// don't use 0 in the data -- we want to catch the zeroed-out case.
418416
let data = (1..=DATASZ).collect::<Vec<_>>();
419417

420418
// since it's a fuzzy test, run several tries.
421-
for _ in 0..NTEST {
419+
for _ in 0..ntest {
422420
for i in 1..=DATASZ {
423421
DROP_COUNTER.store(0, Ordering::SeqCst);
424422

0 commit comments

Comments
 (0)