Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/syntax_highlighting.rs')
| -rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index 83082496d5..ef5d480b49 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs @@ -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) => { |