aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_cargo_watch/src/lib.rs2
-rw-r--r--crates/ra_prof/src/lib.rs8
-rw-r--r--crates/rust-analyzer/tests/heavy_tests/support.rs3
3 files changed, 11 insertions, 2 deletions
diff --git a/crates/ra_cargo_watch/src/lib.rs b/crates/ra_cargo_watch/src/lib.rs
index 1ced7712a..1cac954c3 100644
--- a/crates/ra_cargo_watch/src/lib.rs
+++ b/crates/ra_cargo_watch/src/lib.rs
@@ -35,10 +35,10 @@ pub struct CheckOptions {
35/// The spawned thread is shut down when this struct is dropped. 35/// The spawned thread is shut down when this struct is dropped.
36#[derive(Debug)] 36#[derive(Debug)]
37pub struct CheckWatcher { 37pub struct CheckWatcher {
38 pub task_recv: Receiver<CheckTask>,
39 // XXX: drop order is significant 38 // XXX: drop order is significant
40 cmd_send: Option<Sender<CheckCommand>>, 39 cmd_send: Option<Sender<CheckCommand>>,
41 handle: Option<jod_thread::JoinHandle<()>>, 40 handle: Option<jod_thread::JoinHandle<()>>,
41 pub task_recv: Receiver<CheckTask>,
42} 42}
43 43
44impl CheckWatcher { 44impl CheckWatcher {
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"))]
343pub fn print_backtrace() {
344 eprintln!(
345 r#"enable the backtrace feature:
346 ra_prof = {{ path = "../ra_prof", features = [ "backtrace"] }}
347"#
348 );
349}
342 350
343thread_local!(static IN_SCOPE: RefCell<bool> = RefCell::new(false)); 351thread_local!(static IN_SCOPE: RefCell<bool> = RefCell::new(false));
344 352
diff --git a/crates/rust-analyzer/tests/heavy_tests/support.rs b/crates/rust-analyzer/tests/heavy_tests/support.rs
index 1d7062bdf..67f3c9332 100644
--- a/crates/rust-analyzer/tests/heavy_tests/support.rs
+++ b/crates/rust-analyzer/tests/heavy_tests/support.rs
@@ -83,9 +83,10 @@ pub fn project(fixture: &str) -> Server {
83pub struct Server { 83pub struct Server {
84 req_id: Cell<u64>, 84 req_id: Cell<u64>,
85 messages: RefCell<Vec<Message>>, 85 messages: RefCell<Vec<Message>>,
86 dir: TempDir,
87 _thread: jod_thread::JoinHandle<()>, 86 _thread: jod_thread::JoinHandle<()>,
88 client: Connection, 87 client: Connection,
88 /// XXX: remove the tempdir last
89 dir: TempDir,
89} 90}
90 91
91impl Server { 92impl Server {