Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/semantics.rs')
-rw-r--r--crates/hir/src/semantics.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs
index 8fc08abef1..c696ebcf18 100644
--- a/crates/hir/src/semantics.rs
+++ b/crates/hir/src/semantics.rs
@@ -550,7 +550,7 @@ impl<'db> SemanticsImpl<'db> {
}
pub fn parse_or_expand(&self, file_id: HirFileId) -> SyntaxNode {
- let node = self.db.parse_or_expand(file_id);
+ let node = file_id.parse_or_expand(self.db);
self.cache(node.clone(), file_id);
node
}
@@ -690,7 +690,7 @@ impl<'db> SemanticsImpl<'db> {
pub fn derive_helpers_in_scope(&self, adt: &ast::Adt) -> Option<Vec<(Symbol, Symbol)>> {
let sa = self.analyze_no_infer(adt.syntax())?;
- let id = self.db.ast_id_map(sa.file_id).ast_id(adt);
+ let id = sa.file_id.ast_id_map(self.db).ast_id(adt);
let result = sa
.resolver
.def_map()
@@ -713,7 +713,7 @@ impl<'db> SemanticsImpl<'db> {
})?;
let attr_name = attr.path().and_then(|it| it.as_single_name_ref())?.as_name();
let sa = self.analyze_no_infer(adt.syntax())?;
- let id = self.db.ast_id_map(sa.file_id).ast_id(&adt);
+ let id = sa.file_id.ast_id_map(self.db).ast_id(&adt);
let res: Vec<_> = sa
.resolver
.def_map()
@@ -1498,7 +1498,7 @@ impl<'db> SemanticsImpl<'db> {
self.analyze_impl(InFile::new(expansion, &parent), None, false)
})?
.resolver;
- let id = db.ast_id_map(expansion).ast_id(&adt);
+ let id = expansion.ast_id_map(db).ast_id(&adt);
let helpers = resolver
.def_map()
.derive_helpers_in_scope(InFile::new(expansion, id))?;