1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Focused local guard for integration tests that mutate the process-global
// panic hook, per docs/testing.md "Process-Global Panic Hook Tests". Kept
// separate from `crate::test_support::PANIC_HOOK_GUARD` (crate-internal,
// synchronous-only) because integration tests need to hold the guard across
// `.await` while a spawned command panics.
use ;
use Mutex;
/// Serializes integration tests that install a process-global panic hook.
///
/// The panic hook is process-global and tests in this binary can run
/// concurrently on different threads, so a test that silences the hook must
/// not overlap with another test that panics for real, or the latter's
/// message and location would be lost.
pub static PANIC_HOOK_GUARD: = const_new;
type PanicHook = ;
/// Installs a no-op panic hook for as long as the guard is held, restoring
/// the previous hook on drop.
///
/// The default hook synchronously captures and symbolicates a backtrace when
/// `RUST_BACKTRACE=1` (set repo-wide in CI), on the panicking thread, before
/// `catch_unwind` regains control. On Windows this symbolication can be slow
/// enough to blow through a bounded `timeout`, especially when the panic
/// happens on a `current_thread` runtime where the same thread also drives
/// the timers/subscriptions the test is waiting on. See docs/testing.md.