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.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_hir/src/nameres.rs') 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 { impl CrateDefMap { pub(crate) fn crate_def_map_query(db: &impl DefDatabase, krate: Crate) -> Arc { + db.check_canceled(); let _p = profile("crate_def_map_query"); let def_map = { let edition = krate.edition(db); -- cgit v1.2.3