File tree Expand file tree Collapse file tree 3 files changed +5
-82
lines changed Expand file tree Collapse file tree 3 files changed +5
-82
lines changed Original file line number Diff line number Diff line change 11use std:: cmp:: Ordering ;
2+ use std:: fmt:: Debug ;
23use std:: sync:: atomic:: AtomicUsize ;
34use 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 {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #[ path = "../../testing/crash_test.rs" ]
12pub mod crash_test;
You can’t perform that action at this time.
0 commit comments