mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 10:39:45 +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
|
|
@ -18,7 +18,9 @@ use either::Either;
|
|||
use hir::{
|
||||
DefWithBody, HirFileIdExt, InFile, InRealFile, MacroFileIdExt, MacroKind, Name, Semantics,
|
||||
};
|
||||
use ide_db::{FxHashMap, FxHashSet, Ranker, RootDatabase, SymbolKind};
|
||||
use ide_db::{
|
||||
base_db::salsa::AsDynDatabase, FxHashMap, FxHashSet, Ranker, RootDatabase, SymbolKind,
|
||||
};
|
||||
use span::EditionedFileId;
|
||||
use syntax::{
|
||||
ast::{self, IsString},
|
||||
|
|
@ -203,7 +205,9 @@ pub(crate) fn highlight(
|
|||
|
||||
// Determine the root based on the given range.
|
||||
let (root, range_to_highlight) = {
|
||||
let file = sema.parse(file_id);
|
||||
let editioned_file_id_wrapper =
|
||||
ide_db::base_db::EditionedFileId::new(db.as_dyn_database(), file_id);
|
||||
let file = sema.parse(editioned_file_id_wrapper);
|
||||
let source_file = file.syntax();
|
||||
match range_to_highlight {
|
||||
Some(range) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue