From 695294bbb974cdbac136e260029403e90a17d953 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 8 Jan 2019 21:00:51 +0300 Subject: ra_db is independent from editor --- crates/ra_hir/src/ty.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_hir/src/ty.rs') diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index 8adeedddb..90ba393ce 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs @@ -1049,6 +1049,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { } pub fn infer(db: &impl HirDatabase, def_id: DefId) -> Cancelable> { + db.check_canceled()?; let function = Function::new(def_id); // TODO: consts also need inference let body = function.body(db)?; let scopes = db.fn_scopes(def_id)?; -- cgit v1.2.3