Skip to content

Commit 96aa17f

Browse files
authored
Unrolled build for #142674
Rollup merge of #142674 - hkBst:remove-duplicate-crashtest, r=bjorn3 remove duplicate crash test I noticed near duplication between "library/alloctests/tests/testing/crash_test.rs" and "library/alloctests/testing/crash_test.rs" and wanted to try and remove that. The only difference is the path used to import `Debug`, but it seems not to matter. Perhaps my change is still wrong? r? ``@bjorn3``
2 parents f9c15f4 + 2c434ed commit 96aa17f

File tree

3 files changed

+5
-82
lines changed

3 files changed

+5
-82
lines changed

library/alloctests/testing/crash_test.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
use std::cmp::Ordering;
2+
use std::fmt::Debug;
23
use std::sync::atomic::AtomicUsize;
34
use std::sync::atomic::Ordering::SeqCst;
45

5-
use crate::fmt::Debug; // the `Debug` trait is the only thing we use from `crate::fmt`
6-
76
/// A blueprint for crash test dummy instances that monitor particular events.
87
/// Some instances may be configured to panic at some point.
98
/// Events are `clone`, `drop` or some anonymous `query`.
@@ -36,6 +35,7 @@ impl CrashTestDummy {
3635
}
3736

3837
/// Returns how many times instances of the dummy have been cloned.
38+
#[allow(unused)]
3939
pub(crate) fn cloned(&self) -> usize {
4040
self.cloned.load(SeqCst)
4141
}
@@ -46,6 +46,7 @@ impl CrashTestDummy {
4646
}
4747

4848
/// Returns how many times instances of the dummy have had their `query` member invoked.
49+
#[allow(unused)]
4950
pub(crate) fn queried(&self) -> usize {
5051
self.queried.load(SeqCst)
5152
}
@@ -71,6 +72,7 @@ impl Instance<'_> {
7172
}
7273

7374
/// Some anonymous query, the result of which is already given.
75+
#[allow(unused)]
7476
pub(crate) fn query<R>(&self, result: R) -> R {
7577
self.origin.queried.fetch_add(1, SeqCst);
7678
if self.panic == Panic::InQuery {

library/alloctests/tests/testing/crash_test.rs

Lines changed: 0 additions & 80 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#[path = "../../testing/crash_test.rs"]
12
pub mod crash_test;

0 commit comments

Comments
 (0)