diff options
author | Aleksey Kladov <[email protected]> | 2020-03-28 12:19:05 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-03-30 10:33:01 +0100 |
commit | 12297ab67533200748ee9f60da4bc86dee1133d9 (patch) | |
tree | 2f46877e85c6a10b810dd6ff2a0e0c680c800bda /crates/ra_prof/src | |
parent | f7df0b56a76360419b31d8030c5c250bd54d8b6d (diff) |
Fix race in the tests
Diffstat (limited to 'crates/ra_prof/src')
-rw-r--r-- | crates/ra_prof/src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs index 9e167db96..00ea3a9b0 100644 --- a/crates/ra_prof/src/lib.rs +++ b/crates/ra_prof/src/lib.rs | |||
@@ -339,6 +339,14 @@ pub fn print_backtrace() { | |||
339 | let bt = backtrace::Backtrace::new(); | 339 | let bt = backtrace::Backtrace::new(); |
340 | eprintln!("{:?}", bt); | 340 | eprintln!("{:?}", bt); |
341 | } | 341 | } |
342 | #[cfg(not(feature = "backtrace"))] | ||
343 | pub fn print_backtrace() { | ||
344 | eprintln!( | ||
345 | r#"enable the backtrace feature: | ||
346 | ra_prof = {{ path = "../ra_prof", features = [ "backtrace"] }} | ||
347 | "# | ||
348 | ); | ||
349 | } | ||
342 | 350 | ||
343 | thread_local!(static IN_SCOPE: RefCell<bool> = RefCell::new(false)); | 351 | thread_local!(static IN_SCOPE: RefCell<bool> = RefCell::new(false)); |
344 | 352 | ||