aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-29 20:13:03 +0100
committerAleksey Kladov <[email protected]>2019-05-29 20:13:03 +0100
commit6bcc1b8b9e9ff90a5c5442dce230dba5995ca5b5 (patch)
treeda33b8ea0737c561ec33a00e900cfd23bd0a0199 /crates/ra_hir/src/nameres
parenta9373c4220a677e4ba38185d14fce67b56fdee44 (diff)
add cacellation checks to expensive queries
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r--crates/ra_hir/src/nameres/collector.rs1
1 files changed, 1 insertions, 0 deletions
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,