mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
hir is cancelation free
This commit is contained in:
parent
8ba9c2d4ce
commit
02c3d2f78e
3 changed files with 6 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
|||
use ra_db::{Cancelable, SourceRootId, FileId};
|
||||
use ra_db::{SourceRootId, FileId};
|
||||
use ra_syntax::{ast, SyntaxNode, AstNode, TreeArc};
|
||||
|
||||
use crate::{
|
||||
|
@ -176,12 +176,9 @@ impl Module {
|
|||
curr_per_ns
|
||||
}
|
||||
|
||||
pub fn problems_impl(
|
||||
&self,
|
||||
db: &impl HirDatabase,
|
||||
) -> Cancelable<Vec<(TreeArc<SyntaxNode>, Problem)>> {
|
||||
pub fn problems_impl(&self, db: &impl HirDatabase) -> Vec<(TreeArc<SyntaxNode>, Problem)> {
|
||||
let loc = self.def_id.loc(db);
|
||||
let module_tree = db.module_tree(loc.source_root_id);
|
||||
Ok(loc.module_id.problems(&module_tree, db))
|
||||
loc.module_id.problems(&module_tree, db)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue