aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-15 12:45:48 +0000
committerAleksey Kladov <[email protected]>2019-01-15 12:45:48 +0000
commitfedd320cf284ec5d489e62bf809277cedd9f60ac (patch)
treeba684c9ce0161079026b47b17d933d8c845476e2 /crates/ra_hir
parentdd45697e5396d4a6ac8e838e1f4f510c960b9c43 (diff)
check_canceled does not return Result
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/module_tree.rs4
-rw-r--r--crates/ra_hir/src/nameres.rs2
-rw-r--r--crates/ra_hir/src/ty.rs2
3 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/module_tree.rs b/crates/ra_hir/src/module_tree.rs
index 67823e970..fd5a92c5b 100644
--- a/crates/ra_hir/src/module_tree.rs
+++ b/crates/ra_hir/src/module_tree.rs
@@ -42,7 +42,7 @@ impl Submodule {
42 db: &impl HirDatabase, 42 db: &impl HirDatabase,
43 source: SourceItemId, 43 source: SourceItemId,
44 ) -> Cancelable<Arc<Vec<Submodule>>> { 44 ) -> Cancelable<Arc<Vec<Submodule>>> {
45 db.check_canceled()?; 45 db.check_canceled();
46 let file_id = source.file_id; 46 let file_id = source.file_id;
47 let file_items = db.file_items(file_id); 47 let file_items = db.file_items(file_id);
48 let module_source = ModuleSource::from_source_item_id(db, source); 48 let module_source = ModuleSource::from_source_item_id(db, source);
@@ -117,7 +117,7 @@ impl ModuleTree {
117 db: &impl HirDatabase, 117 db: &impl HirDatabase,
118 source_root: SourceRootId, 118 source_root: SourceRootId,
119 ) -> Cancelable<Arc<ModuleTree>> { 119 ) -> Cancelable<Arc<ModuleTree>> {
120 db.check_canceled()?; 120 db.check_canceled();
121 let res = create_module_tree(db, source_root); 121 let res = create_module_tree(db, source_root);
122 Ok(Arc::new(res?)) 122 Ok(Arc::new(res?))
123 } 123 }
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs
index 6bf949654..edb3b1e64 100644
--- a/crates/ra_hir/src/nameres.rs
+++ b/crates/ra_hir/src/nameres.rs
@@ -327,7 +327,7 @@ where
327 loop { 327 loop {
328 let processed_imports_count = self.processed_imports.len(); 328 let processed_imports_count = self.processed_imports.len();
329 for &module_id in self.input.keys() { 329 for &module_id in self.input.keys() {
330 self.db.check_canceled()?; 330 self.db.check_canceled();
331 self.resolve_imports(module_id)?; 331 self.resolve_imports(module_id)?;
332 } 332 }
333 if processed_imports_count == self.processed_imports.len() { 333 if processed_imports_count == self.processed_imports.len() {
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs
index 5579db8fb..03787bd89 100644
--- a/crates/ra_hir/src/ty.rs
+++ b/crates/ra_hir/src/ty.rs
@@ -1203,7 +1203,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1203} 1203}
1204 1204
1205pub fn infer(db: &impl HirDatabase, def_id: DefId) -> Cancelable<Arc<InferenceResult>> { 1205pub fn infer(db: &impl HirDatabase, def_id: DefId) -> Cancelable<Arc<InferenceResult>> {
1206 db.check_canceled()?; 1206 db.check_canceled();
1207 let function = Function::new(def_id); // TODO: consts also need inference 1207 let function = Function::new(def_id); // TODO: consts also need inference
1208 let body = function.body(db)?; 1208 let body = function.body(db)?;
1209 let scopes = db.fn_scopes(def_id)?; 1209 let scopes = db.fn_scopes(def_id)?;