diff options
-rw-r--r-- | crates/ra_hir/src/nameres.rs | 1 | ||||
-rw-r--r-- | crates/ra_hir/src/nameres/collector.rs | 1 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/traits.rs | 1 | ||||
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 2 | ||||
-rw-r--r-- | crates/ra_lsp_server/tests/heavy_tests/support.rs | 2 |
5 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 9b9212bfc..42dcac332 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs | |||
@@ -222,6 +222,7 @@ fn or(left: ItemOrMacro, right: ItemOrMacro) -> ItemOrMacro { | |||
222 | 222 | ||
223 | impl CrateDefMap { | 223 | impl CrateDefMap { |
224 | pub(crate) fn crate_def_map_query(db: &impl DefDatabase, krate: Crate) -> Arc<CrateDefMap> { | 224 | pub(crate) fn crate_def_map_query(db: &impl DefDatabase, krate: Crate) -> Arc<CrateDefMap> { |
225 | db.check_canceled(); | ||
225 | let _p = profile("crate_def_map_query"); | 226 | let _p = profile("crate_def_map_query"); |
226 | let def_map = { | 227 | let def_map = { |
227 | let edition = krate.edition(db); | 228 | let edition = krate.edition(db); |
diff --git a/crates/ra_hir/src/nameres/collector.rs b/crates/ra_hir/src/nameres/collector.rs index ba7ea0017..af8ac064c 100644 --- a/crates/ra_hir/src/nameres/collector.rs +++ b/crates/ra_hir/src/nameres/collector.rs | |||
@@ -112,6 +112,7 @@ where | |||
112 | // main name resolution fixed-point loop. | 112 | // main name resolution fixed-point loop. |
113 | let mut i = 0; | 113 | let mut i = 0; |
114 | loop { | 114 | loop { |
115 | self.db.check_canceled(); | ||
115 | match (self.resolve_imports(), self.resolve_macros()) { | 116 | match (self.resolve_imports(), self.resolve_macros()) { |
116 | (ReachedFixedPoint::Yes, ReachedFixedPoint::Yes) => break, | 117 | (ReachedFixedPoint::Yes, ReachedFixedPoint::Yes) => break, |
117 | _ => i += 1, | 118 | _ => i += 1, |
diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs index e6c78c0d4..fc90f56d5 100644 --- a/crates/ra_hir/src/ty/traits.rs +++ b/crates/ra_hir/src/ty/traits.rs | |||
@@ -82,6 +82,7 @@ pub(crate) fn implements_query( | |||
82 | krate: Crate, | 82 | krate: Crate, |
83 | trait_ref: Canonical<TraitRef>, | 83 | trait_ref: Canonical<TraitRef>, |
84 | ) -> Option<Solution> { | 84 | ) -> Option<Solution> { |
85 | db.check_canceled(); | ||
85 | let _p = profile("implements_query"); | 86 | let _p = profile("implements_query"); |
86 | let goal: chalk_ir::Goal = trait_ref.value.to_chalk(db).cast(); | 87 | let goal: chalk_ir::Goal = trait_ref.value.to_chalk(db).cast(); |
87 | debug!("goal: {:?}", goal); | 88 | debug!("goal: {:?}", goal); |
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index dc817f2d9..0ebfd641d 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs | |||
@@ -34,7 +34,7 @@ pub fn handle_analyzer_status(world: ServerWorld, _: ()) -> Result<String> { | |||
34 | let requests = world.latest_completed_requests.read(); | 34 | let requests = world.latest_completed_requests.read(); |
35 | for (idx, r) in requests.iter().enumerate() { | 35 | for (idx, r) in requests.iter().enumerate() { |
36 | let current = if idx == world.request_idx { "*" } else { " " }; | 36 | let current = if idx == world.request_idx { "*" } else { " " }; |
37 | writeln!(buf, "{:4}{}{:<36}: {:?}", r.id, current, r.method, r.duration).unwrap(); | 37 | writeln!(buf, "{:4}{}{:<36}{}ms", r.id, current, r.method, r.duration.as_millis()).unwrap(); |
38 | } | 38 | } |
39 | Ok(buf) | 39 | Ok(buf) |
40 | } | 40 | } |
diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs index 729067395..f952a03a3 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/support.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs | |||
@@ -227,7 +227,7 @@ impl Drop for Server { | |||
227 | } | 227 | } |
228 | 228 | ||
229 | fn recv_timeout(receiver: &Receiver<RawMessage>) -> Option<RawMessage> { | 229 | fn recv_timeout(receiver: &Receiver<RawMessage>) -> Option<RawMessage> { |
230 | let timeout = Duration::from_secs(50); | 230 | let timeout = Duration::from_secs(120); |
231 | select! { | 231 | select! { |
232 | recv(receiver) -> msg => msg.ok(), | 232 | recv(receiver) -> msg => msg.ok(), |
233 | recv(after(timeout)) -> _ => panic!("timed out"), | 233 | recv(after(timeout)) -> _ => panic!("timed out"), |