mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-19 03:28:36 +00:00
internal: port rust-analyzer to new Salsa
This commit is contained in:
parent
394374e769
commit
74620e64ec
161 changed files with 3075 additions and 2331 deletions
|
|
@ -1,7 +1,7 @@
|
|||
//! This module is responsible for resolving paths within rules.
|
||||
|
||||
use hir::AsAssocItem;
|
||||
use ide_db::FxHashMap;
|
||||
use ide_db::{base_db::salsa::AsDynDatabase, FxHashMap};
|
||||
use parsing::Placeholder;
|
||||
use syntax::{
|
||||
ast::{self, HasGenericArgs},
|
||||
|
|
@ -198,7 +198,12 @@ impl<'db> ResolutionScope<'db> {
|
|||
resolve_context: hir::FilePosition,
|
||||
) -> Option<ResolutionScope<'db>> {
|
||||
use syntax::ast::AstNode;
|
||||
let file = sema.parse(resolve_context.file_id);
|
||||
let editioned_file_id_wrapper = ide_db::base_db::EditionedFileId::new(
|
||||
sema.db.as_dyn_database(),
|
||||
resolve_context.file_id,
|
||||
);
|
||||
|
||||
let file = sema.parse(editioned_file_id_wrapper);
|
||||
// Find a node at the requested position, falling back to the whole file.
|
||||
let node = file
|
||||
.syntax()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue