From 6bcc1b8b9e9ff90a5c5442dce230dba5995ca5b5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 29 May 2019 22:13:03 +0300 Subject: add cacellation checks to expensive queries --- crates/ra_hir/src/nameres/collector.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_hir/src/nameres/collector.rs') 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 // main name resolution fixed-point loop. let mut i = 0; loop { + self.db.check_canceled(); match (self.resolve_imports(), self.resolve_macros()) { (ReachedFixedPoint::Yes, ReachedFixedPoint::Yes) => break, _ => i += 1, -- cgit v1.2.3