From d659b7a2f03788eb0f4f15e3730bbf65a18ed818 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 27 Nov 2018 21:45:42 +0300 Subject: start descriptors -> hir rename --- crates/ra_analysis/src/db.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 4e34265fb..fa59b8b3e 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -7,7 +7,7 @@ use salsa::{self, Database}; use crate::{ db, - descriptors, + hir, symbol_index::SymbolIndex, syntax_ptr::SyntaxPtr, loc2id::{IdMaps, IdDatabase}, @@ -122,15 +122,15 @@ salsa::database_storage! { fn file_symbols() for FileSymbolsQuery; fn resolve_syntax_ptr() for ResolveSyntaxPtrQuery; } - impl descriptors::DescriptorDatabase { - fn module_tree() for descriptors::ModuleTreeQuery; - fn fn_scopes() for descriptors::FnScopesQuery; - fn _file_items() for descriptors::FileItemsQuery; - fn _file_item() for descriptors::FileItemQuery; - fn _input_module_items() for descriptors::InputModuleItemsQuery; - fn _item_map() for descriptors::ItemMapQuery; - fn _fn_syntax() for descriptors::FnSyntaxQuery; - fn _submodules() for descriptors::SubmodulesQuery; + impl hir::DescriptorDatabase { + fn module_tree() for hir::ModuleTreeQuery; + fn fn_scopes() for hir::FnScopesQuery; + fn _file_items() for hir::FileItemsQuery; + fn _file_item() for hir::FileItemQuery; + fn _input_module_items() for hir::InputModuleItemsQuery; + fn _item_map() for hir::ItemMapQuery; + fn _fn_syntax() for hir::FnSyntaxQuery; + fn _submodules() for hir::SubmodulesQuery; } } } -- cgit v1.2.3 From f4d0cb64fc8b3010bdc4b168a2fa6d96a6cf90b1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 27 Nov 2018 21:58:44 +0300 Subject: rename descriptorsdb -> hirdb --- crates/ra_analysis/src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index fa59b8b3e..b4fbbe7ad 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -122,7 +122,7 @@ salsa::database_storage! { fn file_symbols() for FileSymbolsQuery; fn resolve_syntax_ptr() for ResolveSyntaxPtrQuery; } - impl hir::DescriptorDatabase { + impl hir::HirDatabase { fn module_tree() for hir::ModuleTreeQuery; fn fn_scopes() for hir::FnScopesQuery; fn _file_items() for hir::FileItemsQuery; -- cgit v1.2.3 From f14902f67bbc5f68cb700b6b929b269d3d51a4a9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 27 Nov 2018 23:03:08 +0300 Subject: move hir db --- crates/ra_analysis/src/db.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index b4fbbe7ad..08aa9053b 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -122,15 +122,15 @@ salsa::database_storage! { fn file_symbols() for FileSymbolsQuery; fn resolve_syntax_ptr() for ResolveSyntaxPtrQuery; } - impl hir::HirDatabase { - fn module_tree() for hir::ModuleTreeQuery; - fn fn_scopes() for hir::FnScopesQuery; - fn _file_items() for hir::FileItemsQuery; - fn _file_item() for hir::FileItemQuery; - fn _input_module_items() for hir::InputModuleItemsQuery; - fn _item_map() for hir::ItemMapQuery; - fn _fn_syntax() for hir::FnSyntaxQuery; - fn _submodules() for hir::SubmodulesQuery; + impl hir::db::HirDatabase { + fn module_tree() for hir::db::ModuleTreeQuery; + fn fn_scopes() for hir::db::FnScopesQuery; + fn _file_items() for hir::db::FileItemsQuery; + fn _file_item() for hir::db::FileItemQuery; + fn _input_module_items() for hir::db::InputModuleItemsQuery; + fn _item_map() for hir::db::ItemMapQuery; + fn _fn_syntax() for hir::db::FnSyntaxQuery; + fn _submodules() for hir::db::SubmodulesQuery; } } } -- cgit v1.2.3 From b7049ea543d5ea9a965dfa51d9da923739f2420d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 27 Nov 2018 23:33:36 +0300 Subject: move query definitions --- crates/ra_analysis/src/db.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 08aa9053b..78bbfcf2d 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -10,7 +10,7 @@ use crate::{ hir, symbol_index::SymbolIndex, syntax_ptr::SyntaxPtr, - loc2id::{IdMaps, IdDatabase}, + loc2id::{IdMaps}, Cancelable, Canceled, FileId, }; @@ -77,7 +77,14 @@ impl salsa::ParallelDatabase for RootDatabase { } } -impl IdDatabase for RootDatabase { +pub(crate) trait BaseDatabase: salsa::Database { + fn id_maps(&self) -> &IdMaps; + fn check_canceled(&self) -> Cancelable<()> { + check_canceled(self) + } +} + +impl BaseDatabase for RootDatabase { fn id_maps(&self) -> &IdMaps { &self.id_maps } @@ -136,7 +143,7 @@ salsa::database_storage! { } salsa::query_group! { - pub(crate) trait SyntaxDatabase: crate::input::FilesDatabase { + pub(crate) trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase { fn file_syntax(file_id: FileId) -> SourceFileNode { type FileSyntaxQuery; } -- cgit v1.2.3 From 4c9933c01657349438f9170c2ef7d6352144b224 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 01:38:39 +0300 Subject: check_canceled is a method --- crates/ra_analysis/src/db.rs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 78bbfcf2d..d7fffc188 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -6,7 +6,6 @@ use ra_syntax::{SourceFileNode, SyntaxNode}; use salsa::{self, Database}; use crate::{ - db, hir, symbol_index::SymbolIndex, syntax_ptr::SyntaxPtr, @@ -59,14 +58,6 @@ impl Default for RootDatabase { } } -pub(crate) fn check_canceled(db: &impl salsa::Database) -> Cancelable<()> { - if db.salsa_runtime().is_current_revision_canceled() { - Err(Canceled) - } else { - Ok(()) - } -} - impl salsa::ParallelDatabase for RootDatabase { fn snapshot(&self) -> salsa::Snapshot { salsa::Snapshot::new(RootDatabase { @@ -80,7 +71,11 @@ impl salsa::ParallelDatabase for RootDatabase { pub(crate) trait BaseDatabase: salsa::Database { fn id_maps(&self) -> &IdMaps; fn check_canceled(&self) -> Cancelable<()> { - check_canceled(self) + if self.salsa_runtime().is_current_revision_canceled() { + Err(Canceled) + } else { + Ok(()) + } } } @@ -171,7 +166,7 @@ fn file_lines(db: &impl SyntaxDatabase, file_id: FileId) -> Arc { Arc::new(LineIndex::new(&*text)) } fn file_symbols(db: &impl SyntaxDatabase, file_id: FileId) -> Cancelable> { - db::check_canceled(db)?; + db.check_canceled()?; let syntax = db.file_syntax(file_id); Ok(Arc::new(SymbolIndex::for_file(file_id, syntax))) } -- cgit v1.2.3 From 00df339c419fc75af6a939b75be8bef5b5a69732 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 01:48:43 +0300 Subject: rename --- crates/ra_analysis/src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index d7fffc188..97f170473 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -127,7 +127,7 @@ salsa::database_storage! { impl hir::db::HirDatabase { fn module_tree() for hir::db::ModuleTreeQuery; fn fn_scopes() for hir::db::FnScopesQuery; - fn _file_items() for hir::db::FileItemsQuery; + fn _file_items() for hir::db::SourceFileItemsQuery; fn _file_item() for hir::db::FileItemQuery; fn _input_module_items() for hir::db::InputModuleItemsQuery; fn _item_map() for hir::db::ItemMapQuery; -- cgit v1.2.3 From 201aa7ea2ae75f9599dc74ad2f4d3f41c1540e73 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 02:15:21 +0300 Subject: remove syntax ptr --- crates/ra_analysis/src/db.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 97f170473..4c9c84e4f 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -2,13 +2,12 @@ use std::sync::Arc; #[cfg(test)] use parking_lot::Mutex; use ra_editor::LineIndex; -use ra_syntax::{SourceFileNode, SyntaxNode}; +use ra_syntax::{SourceFileNode}; use salsa::{self, Database}; use crate::{ hir, symbol_index::SymbolIndex, - syntax_ptr::SyntaxPtr, loc2id::{IdMaps}, Cancelable, Canceled, FileId, }; @@ -122,7 +121,6 @@ salsa::database_storage! { fn file_syntax() for FileSyntaxQuery; fn file_lines() for FileLinesQuery; fn file_symbols() for FileSymbolsQuery; - fn resolve_syntax_ptr() for ResolveSyntaxPtrQuery; } impl hir::db::HirDatabase { fn module_tree() for hir::db::ModuleTreeQuery; @@ -148,12 +146,6 @@ salsa::query_group! { fn file_symbols(file_id: FileId) -> Cancelable> { type FileSymbolsQuery; } - fn resolve_syntax_ptr(ptr: SyntaxPtr) -> SyntaxNode { - type ResolveSyntaxPtrQuery; - // Don't retain syntax trees in memory - storage dependencies; - use fn crate::syntax_ptr::resolve_syntax_ptr; - } } } -- cgit v1.2.3 From 65c064b2a99fb9c0589672ae6c9848aaa9e0efcf Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 02:22:25 +0300 Subject: introduce SymbolsDatabase --- crates/ra_analysis/src/db.rs | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 4c9c84e4f..0901c2bba 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -7,7 +7,7 @@ use salsa::{self, Database}; use crate::{ hir, - symbol_index::SymbolIndex, + symbol_index, loc2id::{IdMaps}, Cancelable, Canceled, FileId, }; @@ -114,23 +114,25 @@ salsa::database_storage! { fn file_source_root() for crate::input::FileSourceRootQuery; fn source_root() for crate::input::SourceRootQuery; fn libraries() for crate::input::LibrariesQuery; - fn library_symbols() for crate::input::LibrarySymbolsQuery; fn crate_graph() for crate::input::CrateGraphQuery; } impl SyntaxDatabase { fn file_syntax() for FileSyntaxQuery; fn file_lines() for FileLinesQuery; - fn file_symbols() for FileSymbolsQuery; + } + impl symbol_index::SymbolsDatabase { + fn file_symbols() for symbol_index::FileSymbolsQuery; + fn library_symbols() for symbol_index::LibrarySymbolsQuery; } impl hir::db::HirDatabase { fn module_tree() for hir::db::ModuleTreeQuery; fn fn_scopes() for hir::db::FnScopesQuery; - fn _file_items() for hir::db::SourceFileItemsQuery; - fn _file_item() for hir::db::FileItemQuery; - fn _input_module_items() for hir::db::InputModuleItemsQuery; - fn _item_map() for hir::db::ItemMapQuery; - fn _fn_syntax() for hir::db::FnSyntaxQuery; - fn _submodules() for hir::db::SubmodulesQuery; + fn file_items() for hir::db::SourceFileItemsQuery; + fn file_item() for hir::db::FileItemQuery; + fn input_module_items() for hir::db::InputModuleItemsQuery; + fn item_map() for hir::db::ItemMapQuery; + fn fn_syntax() for hir::db::FnSyntaxQuery; + fn submodules() for hir::db::SubmodulesQuery; } } } @@ -143,9 +145,6 @@ salsa::query_group! { fn file_lines(file_id: FileId) -> Arc { type FileLinesQuery; } - fn file_symbols(file_id: FileId) -> Cancelable> { - type FileSymbolsQuery; - } } } @@ -157,8 +156,3 @@ fn file_lines(db: &impl SyntaxDatabase, file_id: FileId) -> Arc { let text = db.file_text(file_id); Arc::new(LineIndex::new(&*text)) } -fn file_symbols(db: &impl SyntaxDatabase, file_id: FileId) -> Cancelable> { - db.check_canceled()?; - let syntax = db.file_syntax(file_id); - Ok(Arc::new(SymbolIndex::for_file(file_id, syntax))) -} -- cgit v1.2.3 From ec45dfea1e37ba40ea3e2c8c6df0991a3d49213f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 02:25:03 +0300 Subject: rename file_syntax -> source_file --- crates/ra_analysis/src/db.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 0901c2bba..11154cc65 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -117,7 +117,7 @@ salsa::database_storage! { fn crate_graph() for crate::input::CrateGraphQuery; } impl SyntaxDatabase { - fn file_syntax() for FileSyntaxQuery; + fn source_file() for SourceFileQuery; fn file_lines() for FileLinesQuery; } impl symbol_index::SymbolsDatabase { @@ -139,8 +139,8 @@ salsa::database_storage! { salsa::query_group! { pub(crate) trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase { - fn file_syntax(file_id: FileId) -> SourceFileNode { - type FileSyntaxQuery; + fn source_file(file_id: FileId) -> SourceFileNode { + type SourceFileQuery; } fn file_lines(file_id: FileId) -> Arc { type FileLinesQuery; @@ -148,7 +148,7 @@ salsa::query_group! { } } -fn file_syntax(db: &impl SyntaxDatabase, file_id: FileId) -> SourceFileNode { +fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> SourceFileNode { let text = db.file_text(file_id); SourceFileNode::parse(&*text) } -- cgit v1.2.3 From b2de95879a8d48cc4077895376b0aaed1e972169 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 02:49:28 +0300 Subject: generalize location interner --- crates/ra_analysis/src/db.rs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 11154cc65..e0b7afac5 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -8,7 +8,7 @@ use salsa::{self, Database}; use crate::{ hir, symbol_index, - loc2id::{IdMaps}, + loc2id::{IdMaps, LocationIntener, DefId, DefLoc, FnId}, Cancelable, Canceled, FileId, }; @@ -20,7 +20,7 @@ pub(crate) struct RootDatabase { events: (), runtime: salsa::Runtime, - id_maps: IdMaps, + id_maps: Arc, } impl salsa::Database for RootDatabase { @@ -45,7 +45,7 @@ impl Default for RootDatabase { let mut db = RootDatabase { events: Default::default(), runtime: salsa::Runtime::default(), - id_maps: IdMaps::default(), + id_maps: Default::default(), }; db.query_mut(crate::input::SourceRootQuery) .set(crate::input::WORKSPACE, Default::default()); @@ -84,6 +84,18 @@ impl BaseDatabase for RootDatabase { } } +impl AsRef> for RootDatabase { + fn as_ref(&self) -> &LocationIntener { + &self.id_maps.defs + } +} + +impl AsRef> for RootDatabase { + fn as_ref(&self) -> &LocationIntener { + &self.id_maps.fns + } +} + #[cfg(test)] impl RootDatabase { pub(crate) fn log(&self, f: impl FnOnce()) -> Vec> { -- cgit v1.2.3 From 11168c464cd962af3336a2cc68295496066edd6c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 03:25:20 +0300 Subject: move db basics to ra_db This should allow to move hir to a separate crate --- crates/ra_analysis/src/db.rs | 69 ++++++++++---------------------------------- 1 file changed, 16 insertions(+), 53 deletions(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index e0b7afac5..1b2dd4b3d 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -1,15 +1,13 @@ use std::sync::Arc; #[cfg(test)] use parking_lot::Mutex; -use ra_editor::LineIndex; -use ra_syntax::{SourceFileNode}; use salsa::{self, Database}; +use ra_db::{LocationIntener, BaseDatabase}; use crate::{ hir, symbol_index, - loc2id::{IdMaps, LocationIntener, DefId, DefLoc, FnId}, - Cancelable, Canceled, FileId, + loc2id::{IdMaps, DefId, DefLoc, FnId}, }; #[derive(Debug)] @@ -47,11 +45,11 @@ impl Default for RootDatabase { runtime: salsa::Runtime::default(), id_maps: Default::default(), }; - db.query_mut(crate::input::SourceRootQuery) - .set(crate::input::WORKSPACE, Default::default()); - db.query_mut(crate::input::CrateGraphQuery) + db.query_mut(ra_db::SourceRootQuery) + .set(ra_db::WORKSPACE, Default::default()); + db.query_mut(ra_db::CrateGraphQuery) .set((), Default::default()); - db.query_mut(crate::input::LibrariesQuery) + db.query_mut(ra_db::LibrariesQuery) .set((), Default::default()); db } @@ -67,22 +65,7 @@ impl salsa::ParallelDatabase for RootDatabase { } } -pub(crate) trait BaseDatabase: salsa::Database { - fn id_maps(&self) -> &IdMaps; - fn check_canceled(&self) -> Cancelable<()> { - if self.salsa_runtime().is_current_revision_canceled() { - Err(Canceled) - } else { - Ok(()) - } - } -} - -impl BaseDatabase for RootDatabase { - fn id_maps(&self) -> &IdMaps { - &self.id_maps - } -} +impl BaseDatabase for RootDatabase {} impl AsRef> for RootDatabase { fn as_ref(&self) -> &LocationIntener { @@ -121,16 +104,16 @@ impl RootDatabase { salsa::database_storage! { pub(crate) struct RootDatabaseStorage for RootDatabase { - impl crate::input::FilesDatabase { - fn file_text() for crate::input::FileTextQuery; - fn file_source_root() for crate::input::FileSourceRootQuery; - fn source_root() for crate::input::SourceRootQuery; - fn libraries() for crate::input::LibrariesQuery; - fn crate_graph() for crate::input::CrateGraphQuery; + impl ra_db::FilesDatabase { + fn file_text() for ra_db::FileTextQuery; + fn file_source_root() for ra_db::FileSourceRootQuery; + fn source_root() for ra_db::SourceRootQuery; + fn libraries() for ra_db::LibrariesQuery; + fn crate_graph() for ra_db::CrateGraphQuery; } - impl SyntaxDatabase { - fn source_file() for SourceFileQuery; - fn file_lines() for FileLinesQuery; + impl ra_db::SyntaxDatabase { + fn source_file() for ra_db::SourceFileQuery; + fn file_lines() for ra_db::FileLinesQuery; } impl symbol_index::SymbolsDatabase { fn file_symbols() for symbol_index::FileSymbolsQuery; @@ -148,23 +131,3 @@ salsa::database_storage! { } } } - -salsa::query_group! { - pub(crate) trait SyntaxDatabase: crate::input::FilesDatabase + BaseDatabase { - fn source_file(file_id: FileId) -> SourceFileNode { - type SourceFileQuery; - } - fn file_lines(file_id: FileId) -> Arc { - type FileLinesQuery; - } - } -} - -fn source_file(db: &impl SyntaxDatabase, file_id: FileId) -> SourceFileNode { - let text = db.file_text(file_id); - SourceFileNode::parse(&*text) -} -fn file_lines(db: &impl SyntaxDatabase, file_id: FileId) -> Arc { - let text = db.file_text(file_id); - Arc::new(LineIndex::new(&*text)) -} -- cgit v1.2.3 From f66e5b6e6b6f7b2b899ef4207dfe46655d77334c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 03:31:50 +0300 Subject: move ids to HIR --- crates/ra_analysis/src/db.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 1b2dd4b3d..2bc1c8f8f 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -5,9 +5,8 @@ use salsa::{self, Database}; use ra_db::{LocationIntener, BaseDatabase}; use crate::{ - hir, + hir::{self, DefId, DefLoc, FnId, SourceItemId}, symbol_index, - loc2id::{IdMaps, DefId, DefLoc, FnId}, }; #[derive(Debug)] @@ -21,6 +20,12 @@ pub(crate) struct RootDatabase { id_maps: Arc, } +#[derive(Debug, Default)] +struct IdMaps { + fns: LocationIntener, + defs: LocationIntener, +} + impl salsa::Database for RootDatabase { fn salsa_runtime(&self) -> &salsa::Runtime { &self.runtime -- cgit v1.2.3 From 59e29aef633e906837f8fed604435976a46be691 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 04:09:44 +0300 Subject: Move hir to a separate crate --- crates/ra_analysis/src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_analysis/src/db.rs') diff --git a/crates/ra_analysis/src/db.rs b/crates/ra_analysis/src/db.rs index 2bc1c8f8f..7fc3fe31b 100644 --- a/crates/ra_analysis/src/db.rs +++ b/crates/ra_analysis/src/db.rs @@ -3,9 +3,9 @@ use std::sync::Arc; use parking_lot::Mutex; use salsa::{self, Database}; use ra_db::{LocationIntener, BaseDatabase}; +use hir::{self, DefId, DefLoc, FnId, SourceItemId}; use crate::{ - hir::{self, DefId, DefLoc, FnId, SourceItemId}, symbol_index, }; -- cgit v1.2.3