mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Fix race in the tests
This commit is contained in:
parent
f7df0b56a7
commit
12297ab675
3 changed files with 11 additions and 2 deletions
|
@ -339,6 +339,14 @@ pub fn print_backtrace() {
|
|||
let bt = backtrace::Backtrace::new();
|
||||
eprintln!("{:?}", bt);
|
||||
}
|
||||
#[cfg(not(feature = "backtrace"))]
|
||||
pub fn print_backtrace() {
|
||||
eprintln!(
|
||||
r#"enable the backtrace feature:
|
||||
ra_prof = {{ path = "../ra_prof", features = [ "backtrace"] }}
|
||||
"#
|
||||
);
|
||||
}
|
||||
|
||||
thread_local!(static IN_SCOPE: RefCell<bool> = RefCell::new(false));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue