diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-30 10:33:43 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-30 10:33:43 +0100 |
commit | df8752bf3f92f657eb89ba86888c1b8b94c5e8d9 (patch) | |
tree | 2f46877e85c6a10b810dd6ff2a0e0c680c800bda /crates/ra_prof/src | |
parent | 846cbe7d4eb0a5f1b1c943180fdf03b81ede1f24 (diff) | |
parent | 12297ab67533200748ee9f60da4bc86dee1133d9 (diff) |
Merge #3754
3754: Use automatic thread joining for cargo-watch r=matklad a=matklad
r? @kiljacken
Co-authored-by: Aleksey Kladov <[email protected]>
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 | ||