diff options
author | Aleksey Kladov <[email protected]> | 2020-02-19 16:13:27 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-19 16:13:27 +0000 |
commit | 7db7c868812c7289626825988fb6e610ea747eeb (patch) | |
tree | 097a3e09a5ec5209f958d80e1a69f0b33fd0a31b | |
parent | f6c871571c4721d2cfe0780842d930e670d04cf5 (diff) | |
parent | 2ff23c172eb7b74154851de415a01fc2e5a545de (diff) |
Merge pull request #3239 from matklad/opt-backtrace
Make backtrace optional
-rw-r--r-- | crates/ra_prof/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_prof/src/lib.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_prof/Cargo.toml b/crates/ra_prof/Cargo.toml index e06a6d7d2..823745795 100644 --- a/crates/ra_prof/Cargo.toml +++ b/crates/ra_prof/Cargo.toml | |||
@@ -11,7 +11,7 @@ doctest = false | |||
11 | [dependencies] | 11 | [dependencies] |
12 | once_cell = "1.3.1" | 12 | once_cell = "1.3.1" |
13 | itertools = "0.8.2" | 13 | itertools = "0.8.2" |
14 | backtrace = "0.3.44" | 14 | backtrace = { version = "0.3.44", optional = true } |
15 | 15 | ||
16 | [target.'cfg(not(target_env = "msvc"))'.dependencies] | 16 | [target.'cfg(not(target_env = "msvc"))'.dependencies] |
17 | jemallocator = { version = "0.3.2", optional = true } | 17 | jemallocator = { version = "0.3.2", optional = true } |
diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs index 660d85b42..6853a4794 100644 --- a/crates/ra_prof/src/lib.rs +++ b/crates/ra_prof/src/lib.rs | |||
@@ -315,6 +315,7 @@ fn idx_to_children(msgs: &[Message]) -> Vec<Vec<usize>> { | |||
315 | } | 315 | } |
316 | 316 | ||
317 | /// Prints backtrace to stderr, useful for debugging. | 317 | /// Prints backtrace to stderr, useful for debugging. |
318 | #[cfg(feature = "backtrace")] | ||
318 | pub fn print_backtrace() { | 319 | pub fn print_backtrace() { |
319 | let bt = backtrace::Backtrace::new(); | 320 | let bt = backtrace::Backtrace::new(); |
320 | eprintln!("{:?}", bt); | 321 | eprintln!("{:?}", bt); |