diff options
author | Aleksey Kladov <[email protected]> | 2019-01-15 17:56:06 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-15 17:56:06 +0000 |
commit | 02c3d2f78eeea41c6de8430c2a34b38e1cdb861b (patch) | |
tree | d3c4cd4da2408bd1c07519880a4f5edb966890d0 /crates/ra_hir/src/code_model_impl | |
parent | 8ba9c2d4cedbcf8f1d2c644733d2b06fa1984d22 (diff) |
hir is cancelation free
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
-rw-r--r-- | crates/ra_hir/src/code_model_impl/module.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/ra_hir/src/code_model_impl/module.rs b/crates/ra_hir/src/code_model_impl/module.rs index 04301ae53..a5c032d69 100644 --- a/crates/ra_hir/src/code_model_impl/module.rs +++ b/crates/ra_hir/src/code_model_impl/module.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use ra_db::{Cancelable, SourceRootId, FileId}; | 1 | use ra_db::{SourceRootId, FileId}; |
2 | use ra_syntax::{ast, SyntaxNode, AstNode, TreeArc}; | 2 | use ra_syntax::{ast, SyntaxNode, AstNode, TreeArc}; |
3 | 3 | ||
4 | use crate::{ | 4 | use crate::{ |
@@ -176,12 +176,9 @@ impl Module { | |||
176 | curr_per_ns | 176 | curr_per_ns |
177 | } | 177 | } |
178 | 178 | ||
179 | pub fn problems_impl( | 179 | pub fn problems_impl(&self, db: &impl HirDatabase) -> Vec<(TreeArc<SyntaxNode>, Problem)> { |
180 | &self, | ||
181 | db: &impl HirDatabase, | ||
182 | ) -> Cancelable<Vec<(TreeArc<SyntaxNode>, Problem)>> { | ||
183 | let loc = self.def_id.loc(db); | 180 | let loc = self.def_id.loc(db); |
184 | let module_tree = db.module_tree(loc.source_root_id); | 181 | let module_tree = db.module_tree(loc.source_root_id); |
185 | Ok(loc.module_id.problems(&module_tree, db)) | 182 | loc.module_id.problems(&module_tree, db) |
186 | } | 183 | } |
187 | } | 184 | } |