mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 05:38:46 +00:00
Make backtrace optional
This commit is contained in:
parent
27587f3501
commit
2ff23c172e
2 changed files with 2 additions and 1 deletions
|
@ -11,7 +11,7 @@ doctest = false
|
|||
[dependencies]
|
||||
once_cell = "1.3.1"
|
||||
itertools = "0.8.2"
|
||||
backtrace = "0.3.44"
|
||||
backtrace = { version = "0.3.44", optional = true }
|
||||
|
||||
[target.'cfg(not(target_env = "msvc"))'.dependencies]
|
||||
jemallocator = { version = "0.3.2", optional = true }
|
||||
|
|
|
@ -315,6 +315,7 @@ fn idx_to_children(msgs: &[Message]) -> Vec<Vec<usize>> {
|
|||
}
|
||||
|
||||
/// Prints backtrace to stderr, useful for debugging.
|
||||
#[cfg(feature = "backtrace")]
|
||||
pub fn print_backtrace() {
|
||||
let bt = backtrace::Backtrace::new();
|
||||
eprintln!("{:?}", bt);
|
||||
|
|
Loading…
Reference in a new issue