mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +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]
|
[dependencies]
|
||||||
once_cell = "1.3.1"
|
once_cell = "1.3.1"
|
||||||
itertools = "0.8.2"
|
itertools = "0.8.2"
|
||||||
backtrace = "0.3.44"
|
backtrace = { version = "0.3.44", optional = true }
|
||||||
|
|
||||||
[target.'cfg(not(target_env = "msvc"))'.dependencies]
|
[target.'cfg(not(target_env = "msvc"))'.dependencies]
|
||||||
jemallocator = { version = "0.3.2", optional = true }
|
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.
|
/// Prints backtrace to stderr, useful for debugging.
|
||||||
|
#[cfg(feature = "backtrace")]
|
||||||
pub fn print_backtrace() {
|
pub fn print_backtrace() {
|
||||||
let bt = backtrace::Backtrace::new();
|
let bt = backtrace::Backtrace::new();
|
||||||
eprintln!("{:?}", bt);
|
eprintln!("{:?}", bt);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue