aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-27 18:45:05 +0000
committerGitHub <[email protected]>2019-11-27 18:45:05 +0000
commit360f6b7bb32d6280ed787075c4a54f4e5b46fcb6 (patch)
tree4c059427819ef442c785125f48fe83f81f6d667a /crates
parent4946169a96f3d442f463724af481fdb760381ccb (diff)
parent27b362b05910c81fd5b28f6cd5d2c075311032f9 (diff)
Merge #2430
2430: rename ra_ide_api -> ra_ide r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_batch/Cargo.toml2
-rw-r--r--crates/ra_batch/src/lib.rs2
-rw-r--r--crates/ra_cli/Cargo.toml2
-rw-r--r--crates/ra_cli/src/analysis_bench.rs2
-rw-r--r--crates/ra_cli/src/main.rs2
-rw-r--r--crates/ra_db/src/lib.rs2
-rw-r--r--crates/ra_hir/src/code_model.rs20
-rw-r--r--crates/ra_hir/src/code_model/src.rs4
-rw-r--r--crates/ra_hir/src/from_source.rs13
-rw-r--r--crates/ra_hir_def/src/attr.rs2
-rw-r--r--crates/ra_hir_def/src/body.rs2
-rw-r--r--crates/ra_hir_def/src/docs.rs2
-rw-r--r--crates/ra_hir_def/src/lang_item.rs4
-rw-r--r--crates/ra_hir_def/src/lib.rs2
-rw-r--r--crates/ra_hir_def/src/nameres/collector.rs15
-rw-r--r--crates/ra_hir_def/src/nameres/path_resolution.rs16
-rw-r--r--crates/ra_hir_def/src/resolver.rs6
-rw-r--r--crates/ra_hir_ty/src/test_db.rs4
-rw-r--r--crates/ra_hir_ty/src/tests.rs10
-rw-r--r--crates/ra_ide/Cargo.toml (renamed from crates/ra_ide_api/Cargo.toml)4
-rw-r--r--crates/ra_ide/src/assists.rs (renamed from crates/ra_ide_api/src/assists.rs)0
-rw-r--r--crates/ra_ide/src/call_info.rs (renamed from crates/ra_ide_api/src/call_info.rs)0
-rw-r--r--crates/ra_ide/src/change.rs (renamed from crates/ra_ide_api/src/change.rs)0
-rw-r--r--crates/ra_ide/src/completion.rs (renamed from crates/ra_ide_api/src/completion.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_dot.rs (renamed from crates/ra_ide_api/src/completion/complete_dot.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_fn_param.rs (renamed from crates/ra_ide_api/src/completion/complete_fn_param.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_keyword.rs (renamed from crates/ra_ide_api/src/completion/complete_keyword.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_macro_in_item_position.rs (renamed from crates/ra_ide_api/src/completion/complete_macro_in_item_position.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_path.rs (renamed from crates/ra_ide_api/src/completion/complete_path.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_pattern.rs (renamed from crates/ra_ide_api/src/completion/complete_pattern.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_postfix.rs (renamed from crates/ra_ide_api/src/completion/complete_postfix.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_record_literal.rs (renamed from crates/ra_ide_api/src/completion/complete_record_literal.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_record_pattern.rs (renamed from crates/ra_ide_api/src/completion/complete_record_pattern.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_scope.rs (renamed from crates/ra_ide_api/src/completion/complete_scope.rs)0
-rw-r--r--crates/ra_ide/src/completion/complete_snippet.rs (renamed from crates/ra_ide_api/src/completion/complete_snippet.rs)0
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs (renamed from crates/ra_ide_api/src/completion/completion_context.rs)0
-rw-r--r--crates/ra_ide/src/completion/completion_item.rs (renamed from crates/ra_ide_api/src/completion/completion_item.rs)0
-rw-r--r--crates/ra_ide/src/completion/presentation.rs (renamed from crates/ra_ide_api/src/completion/presentation.rs)0
-rw-r--r--crates/ra_ide/src/db.rs (renamed from crates/ra_ide_api/src/db.rs)0
-rw-r--r--crates/ra_ide/src/diagnostics.rs (renamed from crates/ra_ide_api/src/diagnostics.rs)0
-rw-r--r--crates/ra_ide/src/display.rs (renamed from crates/ra_ide_api/src/display.rs)0
-rw-r--r--crates/ra_ide/src/display/function_signature.rs (renamed from crates/ra_ide_api/src/display/function_signature.rs)0
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs (renamed from crates/ra_ide_api/src/display/navigation_target.rs)0
-rw-r--r--crates/ra_ide/src/display/short_label.rs (renamed from crates/ra_ide_api/src/display/short_label.rs)0
-rw-r--r--crates/ra_ide/src/display/structure.rs (renamed from crates/ra_ide_api/src/display/structure.rs)0
-rw-r--r--crates/ra_ide/src/expand.rs (renamed from crates/ra_ide_api/src/expand.rs)0
-rw-r--r--crates/ra_ide/src/expand_macro.rs (renamed from crates/ra_ide_api/src/expand_macro.rs)0
-rw-r--r--crates/ra_ide/src/extend_selection.rs (renamed from crates/ra_ide_api/src/extend_selection.rs)0
-rw-r--r--crates/ra_ide/src/feature_flags.rs (renamed from crates/ra_ide_api/src/feature_flags.rs)0
-rw-r--r--crates/ra_ide/src/folding_ranges.rs (renamed from crates/ra_ide_api/src/folding_ranges.rs)0
-rw-r--r--crates/ra_ide/src/goto_definition.rs (renamed from crates/ra_ide_api/src/goto_definition.rs)0
-rw-r--r--crates/ra_ide/src/goto_type_definition.rs (renamed from crates/ra_ide_api/src/goto_type_definition.rs)0
-rw-r--r--crates/ra_ide/src/hover.rs (renamed from crates/ra_ide_api/src/hover.rs)0
-rw-r--r--crates/ra_ide/src/impls.rs (renamed from crates/ra_ide_api/src/impls.rs)0
-rw-r--r--crates/ra_ide/src/inlay_hints.rs (renamed from crates/ra_ide_api/src/inlay_hints.rs)0
-rw-r--r--crates/ra_ide/src/join_lines.rs (renamed from crates/ra_ide_api/src/join_lines.rs)0
-rw-r--r--crates/ra_ide/src/lib.rs (renamed from crates/ra_ide_api/src/lib.rs)2
-rw-r--r--crates/ra_ide/src/line_index.rs (renamed from crates/ra_ide_api/src/line_index.rs)0
-rw-r--r--crates/ra_ide/src/line_index_utils.rs (renamed from crates/ra_ide_api/src/line_index_utils.rs)0
-rw-r--r--crates/ra_ide/src/marks.rs (renamed from crates/ra_ide_api/src/marks.rs)0
-rw-r--r--crates/ra_ide/src/matching_brace.rs (renamed from crates/ra_ide_api/src/matching_brace.rs)0
-rw-r--r--crates/ra_ide/src/mock_analysis.rs (renamed from crates/ra_ide_api/src/mock_analysis.rs)0
-rw-r--r--crates/ra_ide/src/parent_module.rs (renamed from crates/ra_ide_api/src/parent_module.rs)0
-rw-r--r--crates/ra_ide/src/references.rs (renamed from crates/ra_ide_api/src/references.rs)0
-rw-r--r--crates/ra_ide/src/references/classify.rs (renamed from crates/ra_ide_api/src/references/classify.rs)0
-rw-r--r--crates/ra_ide/src/references/name_definition.rs (renamed from crates/ra_ide_api/src/references/name_definition.rs)0
-rw-r--r--crates/ra_ide/src/references/rename.rs (renamed from crates/ra_ide_api/src/references/rename.rs)0
-rw-r--r--crates/ra_ide/src/references/search_scope.rs (renamed from crates/ra_ide_api/src/references/search_scope.rs)0
-rw-r--r--crates/ra_ide/src/runnables.rs (renamed from crates/ra_ide_api/src/runnables.rs)0
-rw-r--r--crates/ra_ide/src/snapshots/highlighting.html (renamed from crates/ra_ide_api/src/snapshots/highlighting.html)0
-rw-r--r--crates/ra_ide/src/snapshots/rainbow_highlighting.html (renamed from crates/ra_ide_api/src/snapshots/rainbow_highlighting.html)0
-rw-r--r--crates/ra_ide/src/source_change.rs (renamed from crates/ra_ide_api/src/source_change.rs)0
-rw-r--r--crates/ra_ide/src/status.rs (renamed from crates/ra_ide_api/src/status.rs)0
-rw-r--r--crates/ra_ide/src/symbol_index.rs (renamed from crates/ra_ide_api/src/symbol_index.rs)0
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs (renamed from crates/ra_ide_api/src/syntax_highlighting.rs)5
-rw-r--r--crates/ra_ide/src/syntax_tree.rs (renamed from crates/ra_ide_api/src/syntax_tree.rs)0
-rw-r--r--crates/ra_ide/src/test_utils.rs (renamed from crates/ra_ide_api/src/test_utils.rs)0
-rw-r--r--crates/ra_ide/src/typing.rs (renamed from crates/ra_ide_api/src/typing.rs)0
-rw-r--r--crates/ra_ide/src/wasm_shims.rs (renamed from crates/ra_ide_api/src/wasm_shims.rs)0
-rw-r--r--crates/ra_lsp_server/Cargo.toml2
-rw-r--r--crates/ra_lsp_server/src/cargo_target_spec.rs2
-rw-r--r--crates/ra_lsp_server/src/conv.rs6
-rw-r--r--crates/ra_lsp_server/src/lib.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs6
-rw-r--r--crates/ra_lsp_server/src/main_loop/subscriptions.rs2
-rw-r--r--crates/ra_lsp_server/src/world.rs2
87 files changed, 72 insertions, 75 deletions
diff --git a/crates/ra_batch/Cargo.toml b/crates/ra_batch/Cargo.toml
index 35626d77d..3bf351fe3 100644
--- a/crates/ra_batch/Cargo.toml
+++ b/crates/ra_batch/Cargo.toml
@@ -15,6 +15,6 @@ crossbeam-channel = "0.4.0"
15ra_vfs = "0.5.0" 15ra_vfs = "0.5.0"
16ra_vfs_glob = { path = "../ra_vfs_glob" } 16ra_vfs_glob = { path = "../ra_vfs_glob" }
17ra_db = { path = "../ra_db" } 17ra_db = { path = "../ra_db" }
18ra_ide_api = { path = "../ra_ide_api" } 18ra_ide = { path = "../ra_ide" }
19ra_hir = { path = "../ra_hir" } 19ra_hir = { path = "../ra_hir" }
20ra_project_model = { path = "../ra_project_model" } 20ra_project_model = { path = "../ra_project_model" }
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs
index cb389eb26..2c9645c00 100644
--- a/crates/ra_batch/src/lib.rs
+++ b/crates/ra_batch/src/lib.rs
@@ -6,7 +6,7 @@ use rustc_hash::FxHashMap;
6 6
7use crossbeam_channel::{unbounded, Receiver}; 7use crossbeam_channel::{unbounded, Receiver};
8use ra_db::{CrateGraph, FileId, SourceRootId}; 8use ra_db::{CrateGraph, FileId, SourceRootId};
9use ra_ide_api::{AnalysisChange, AnalysisHost, FeatureFlags}; 9use ra_ide::{AnalysisChange, AnalysisHost, FeatureFlags};
10use ra_project_model::{get_rustc_cfg_options, PackageRoot, ProjectWorkspace}; 10use ra_project_model::{get_rustc_cfg_options, PackageRoot, ProjectWorkspace};
11use ra_vfs::{RootEntry, Vfs, VfsChange, VfsTask, Watch}; 11use ra_vfs::{RootEntry, Vfs, VfsChange, VfsTask, Watch};
12use ra_vfs_glob::RustPackageFilterBuilder; 12use ra_vfs_glob::RustPackageFilterBuilder;
diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml
index 3bb475997..c7e0d0f0f 100644
--- a/crates/ra_cli/Cargo.toml
+++ b/crates/ra_cli/Cargo.toml
@@ -10,7 +10,7 @@ pico-args = "0.3.0"
10flexi_logger = "0.14.0" 10flexi_logger = "0.14.0"
11 11
12ra_syntax = { path = "../ra_syntax" } 12ra_syntax = { path = "../ra_syntax" }
13ra_ide_api = { path = "../ra_ide_api" } 13ra_ide = { path = "../ra_ide" }
14ra_batch = { path = "../ra_batch" } 14ra_batch = { path = "../ra_batch" }
15ra_hir = { path = "../ra_hir" } 15ra_hir = { path = "../ra_hir" }
16ra_db = { path = "../ra_db" } 16ra_db = { path = "../ra_db" }
diff --git a/crates/ra_cli/src/analysis_bench.rs b/crates/ra_cli/src/analysis_bench.rs
index 34105af57..5485a38ff 100644
--- a/crates/ra_cli/src/analysis_bench.rs
+++ b/crates/ra_cli/src/analysis_bench.rs
@@ -10,7 +10,7 @@ use ra_db::{
10 salsa::{Database, Durability}, 10 salsa::{Database, Durability},
11 FileId, SourceDatabaseExt, 11 FileId, SourceDatabaseExt,
12}; 12};
13use ra_ide_api::{Analysis, AnalysisChange, AnalysisHost, FilePosition, LineCol}; 13use ra_ide::{Analysis, AnalysisChange, AnalysisHost, FilePosition, LineCol};
14 14
15use crate::Result; 15use crate::Result;
16 16
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs
index 08f353147..fe847e611 100644
--- a/crates/ra_cli/src/main.rs
+++ b/crates/ra_cli/src/main.rs
@@ -9,7 +9,7 @@ use std::{error::Error, fmt::Write, io::Read};
9 9
10use flexi_logger::Logger; 10use flexi_logger::Logger;
11use pico_args::Arguments; 11use pico_args::Arguments;
12use ra_ide_api::{file_structure, Analysis}; 12use ra_ide::{file_structure, Analysis};
13use ra_prof::profile; 13use ra_prof::profile;
14use ra_syntax::{AstNode, SourceFile}; 14use ra_syntax::{AstNode, SourceFile};
15 15
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs
index e8852531b..21341b769 100644
--- a/crates/ra_db/src/lib.rs
+++ b/crates/ra_db/src/lib.rs
@@ -1,4 +1,4 @@
1//! ra_db defines basic database traits. The concrete DB is defined by ra_ide_api. 1//! ra_db defines basic database traits. The concrete DB is defined by ra_ide.
2mod cancellation; 2mod cancellation;
3mod input; 3mod input;
4pub mod fixture; 4pub mod fixture;
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 87c78d98e..5a3e24e9e 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -174,15 +174,15 @@ pub use hir_def::attr::Attrs;
174 174
175impl Module { 175impl Module {
176 pub(crate) fn new(krate: Crate, crate_module_id: LocalModuleId) -> Module { 176 pub(crate) fn new(krate: Crate, crate_module_id: LocalModuleId) -> Module {
177 Module { id: ModuleId { krate: krate.crate_id, module_id: crate_module_id } } 177 Module { id: ModuleId { krate: krate.crate_id, local_id: crate_module_id } }
178 } 178 }
179 179
180 /// Name of this module. 180 /// Name of this module.
181 pub fn name(self, db: &impl DefDatabase) -> Option<Name> { 181 pub fn name(self, db: &impl DefDatabase) -> Option<Name> {
182 let def_map = db.crate_def_map(self.id.krate); 182 let def_map = db.crate_def_map(self.id.krate);
183 let parent = def_map[self.id.module_id].parent?; 183 let parent = def_map[self.id.local_id].parent?;
184 def_map[parent].children.iter().find_map(|(name, module_id)| { 184 def_map[parent].children.iter().find_map(|(name, module_id)| {
185 if *module_id == self.id.module_id { 185 if *module_id == self.id.local_id {
186 Some(name.clone()) 186 Some(name.clone())
187 } else { 187 } else {
188 None 188 None
@@ -206,14 +206,14 @@ impl Module {
206 /// Finds a child module with the specified name. 206 /// Finds a child module with the specified name.
207 pub fn child(self, db: &impl DefDatabase, name: &Name) -> Option<Module> { 207 pub fn child(self, db: &impl DefDatabase, name: &Name) -> Option<Module> {
208 let def_map = db.crate_def_map(self.id.krate); 208 let def_map = db.crate_def_map(self.id.krate);
209 let child_id = def_map[self.id.module_id].children.get(name)?; 209 let child_id = def_map[self.id.local_id].children.get(name)?;
210 Some(self.with_module_id(*child_id)) 210 Some(self.with_module_id(*child_id))
211 } 211 }
212 212
213 /// Iterates over all child modules. 213 /// Iterates over all child modules.
214 pub fn children(self, db: &impl DefDatabase) -> impl Iterator<Item = Module> { 214 pub fn children(self, db: &impl DefDatabase) -> impl Iterator<Item = Module> {
215 let def_map = db.crate_def_map(self.id.krate); 215 let def_map = db.crate_def_map(self.id.krate);
216 let children = def_map[self.id.module_id] 216 let children = def_map[self.id.local_id]
217 .children 217 .children
218 .iter() 218 .iter()
219 .map(|(_, module_id)| self.with_module_id(*module_id)) 219 .map(|(_, module_id)| self.with_module_id(*module_id))
@@ -224,7 +224,7 @@ impl Module {
224 /// Finds a parent module. 224 /// Finds a parent module.
225 pub fn parent(self, db: &impl DefDatabase) -> Option<Module> { 225 pub fn parent(self, db: &impl DefDatabase) -> Option<Module> {
226 let def_map = db.crate_def_map(self.id.krate); 226 let def_map = db.crate_def_map(self.id.krate);
227 let parent_id = def_map[self.id.module_id].parent?; 227 let parent_id = def_map[self.id.local_id].parent?;
228 Some(self.with_module_id(parent_id)) 228 Some(self.with_module_id(parent_id))
229 } 229 }
230 230
@@ -240,7 +240,7 @@ impl Module {
240 240
241 /// Returns a `ModuleScope`: a set of items, visible in this module. 241 /// Returns a `ModuleScope`: a set of items, visible in this module.
242 pub fn scope(self, db: &impl HirDatabase) -> Vec<(Name, ScopeDef, Option<Import>)> { 242 pub fn scope(self, db: &impl HirDatabase) -> Vec<(Name, ScopeDef, Option<Import>)> {
243 db.crate_def_map(self.id.krate)[self.id.module_id] 243 db.crate_def_map(self.id.krate)[self.id.local_id]
244 .scope 244 .scope
245 .entries() 245 .entries()
246 .map(|(name, res)| { 246 .map(|(name, res)| {
@@ -250,7 +250,7 @@ impl Module {
250 } 250 }
251 251
252 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) { 252 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) {
253 db.crate_def_map(self.id.krate).add_diagnostics(db, self.id.module_id, sink); 253 db.crate_def_map(self.id.krate).add_diagnostics(db, self.id.local_id, sink);
254 for decl in self.declarations(db) { 254 for decl in self.declarations(db) {
255 match decl { 255 match decl {
256 crate::ModuleDef::Function(f) => f.diagnostics(db, sink), 256 crate::ModuleDef::Function(f) => f.diagnostics(db, sink),
@@ -275,12 +275,12 @@ impl Module {
275 275
276 pub fn declarations(self, db: &impl DefDatabase) -> Vec<ModuleDef> { 276 pub fn declarations(self, db: &impl DefDatabase) -> Vec<ModuleDef> {
277 let def_map = db.crate_def_map(self.id.krate); 277 let def_map = db.crate_def_map(self.id.krate);
278 def_map[self.id.module_id].scope.declarations().map(ModuleDef::from).collect() 278 def_map[self.id.local_id].scope.declarations().map(ModuleDef::from).collect()
279 } 279 }
280 280
281 pub fn impl_blocks(self, db: &impl DefDatabase) -> Vec<ImplBlock> { 281 pub fn impl_blocks(self, db: &impl DefDatabase) -> Vec<ImplBlock> {
282 let def_map = db.crate_def_map(self.id.krate); 282 let def_map = db.crate_def_map(self.id.krate);
283 def_map[self.id.module_id].impls.iter().copied().map(ImplBlock::from).collect() 283 def_map[self.id.local_id].impls.iter().copied().map(ImplBlock::from).collect()
284 } 284 }
285 285
286 fn with_module_id(self, module_id: LocalModuleId) -> Module { 286 fn with_module_id(self, module_id: LocalModuleId) -> Module {
diff --git a/crates/ra_hir/src/code_model/src.rs b/crates/ra_hir/src/code_model/src.rs
index 076d86f2b..bf3ee0834 100644
--- a/crates/ra_hir/src/code_model/src.rs
+++ b/crates/ra_hir/src/code_model/src.rs
@@ -22,7 +22,7 @@ impl Module {
22 /// Returns a node which defines this module. That is, a file or a `mod foo {}` with items. 22 /// Returns a node which defines this module. That is, a file or a `mod foo {}` with items.
23 pub fn definition_source(self, db: &impl DefDatabase) -> Source<ModuleSource> { 23 pub fn definition_source(self, db: &impl DefDatabase) -> Source<ModuleSource> {
24 let def_map = db.crate_def_map(self.id.krate); 24 let def_map = db.crate_def_map(self.id.krate);
25 let src = def_map[self.id.module_id].definition_source(db); 25 let src = def_map[self.id.local_id].definition_source(db);
26 src.map(|it| match it { 26 src.map(|it| match it {
27 Either::A(it) => ModuleSource::SourceFile(it), 27 Either::A(it) => ModuleSource::SourceFile(it),
28 Either::B(it) => ModuleSource::Module(it), 28 Either::B(it) => ModuleSource::Module(it),
@@ -33,7 +33,7 @@ impl Module {
33 /// `None` for the crate root. 33 /// `None` for the crate root.
34 pub fn declaration_source(self, db: &impl DefDatabase) -> Option<Source<ast::Module>> { 34 pub fn declaration_source(self, db: &impl DefDatabase) -> Option<Source<ast::Module>> {
35 let def_map = db.crate_def_map(self.id.krate); 35 let def_map = db.crate_def_map(self.id.krate);
36 def_map[self.id.module_id].declaration_source(db) 36 def_map[self.id.local_id].declaration_source(db)
37 } 37 }
38} 38}
39 39
diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs
index 95db7161b..9f7c22b21 100644
--- a/crates/ra_hir/src/from_source.rs
+++ b/crates/ra_hir/src/from_source.rs
@@ -262,13 +262,12 @@ impl Module {
262 262
263 let original_file = src.file_id.original_file(db); 263 let original_file = src.file_id.original_file(db);
264 264
265 let (krate, module_id) = 265 let (krate, local_id) = db.relevant_crates(original_file).iter().find_map(|&crate_id| {
266 db.relevant_crates(original_file).iter().find_map(|&crate_id| { 266 let crate_def_map = db.crate_def_map(crate_id);
267 let crate_def_map = db.crate_def_map(crate_id); 267 let local_id = crate_def_map.modules_for_file(original_file).next()?;
268 let local_module_id = crate_def_map.modules_for_file(original_file).next()?; 268 Some((crate_id, local_id))
269 Some((crate_id, local_module_id)) 269 })?;
270 })?; 270 Some(Module { id: ModuleId { krate, local_id } })
271 Some(Module { id: ModuleId { krate, module_id } })
272 } 271 }
273} 272}
274 273
diff --git a/crates/ra_hir_def/src/attr.rs b/crates/ra_hir_def/src/attr.rs
index 298608e27..fffb22201 100644
--- a/crates/ra_hir_def/src/attr.rs
+++ b/crates/ra_hir_def/src/attr.rs
@@ -35,7 +35,7 @@ impl Attrs {
35 match def { 35 match def {
36 AttrDefId::ModuleId(module) => { 36 AttrDefId::ModuleId(module) => {
37 let def_map = db.crate_def_map(module.krate); 37 let def_map = db.crate_def_map(module.krate);
38 let src = match def_map[module.module_id].declaration_source(db) { 38 let src = match def_map[module.local_id].declaration_source(db) {
39 Some(it) => it, 39 Some(it) => it,
40 None => return Attrs::default(), 40 None => return Attrs::default(),
41 }; 41 };
diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs
index 78a532bdd..a57a0176d 100644
--- a/crates/ra_hir_def/src/body.rs
+++ b/crates/ra_hir_def/src/body.rs
@@ -82,7 +82,7 @@ impl Expander {
82 } 82 }
83 83
84 fn resolve_path_as_macro(&self, db: &impl DefDatabase, path: &Path) -> Option<MacroDefId> { 84 fn resolve_path_as_macro(&self, db: &impl DefDatabase, path: &Path) -> Option<MacroDefId> {
85 self.crate_def_map.resolve_path(db, self.module.module_id, path).0.take_macros() 85 self.crate_def_map.resolve_path(db, self.module.local_id, path).0.take_macros()
86 } 86 }
87} 87}
88 88
diff --git a/crates/ra_hir_def/src/docs.rs b/crates/ra_hir_def/src/docs.rs
index 4749b642f..34ed9b7a5 100644
--- a/crates/ra_hir_def/src/docs.rs
+++ b/crates/ra_hir_def/src/docs.rs
@@ -36,7 +36,7 @@ impl Documentation {
36 match def { 36 match def {
37 AttrDefId::ModuleId(module) => { 37 AttrDefId::ModuleId(module) => {
38 let def_map = db.crate_def_map(module.krate); 38 let def_map = db.crate_def_map(module.krate);
39 let src = def_map[module.module_id].declaration_source(db)?; 39 let src = def_map[module.local_id].declaration_source(db)?;
40 docs_from_ast(&src.value) 40 docs_from_ast(&src.value)
41 } 41 }
42 AttrDefId::StructFieldId(it) => { 42 AttrDefId::StructFieldId(it) => {
diff --git a/crates/ra_hir_def/src/lang_item.rs b/crates/ra_hir_def/src/lang_item.rs
index f15c23db9..f4fdbdcfc 100644
--- a/crates/ra_hir_def/src/lang_item.rs
+++ b/crates/ra_hir_def/src/lang_item.rs
@@ -41,7 +41,7 @@ impl LangItems {
41 crate_def_map 41 crate_def_map
42 .modules 42 .modules
43 .iter() 43 .iter()
44 .filter_map(|(module_id, _)| db.module_lang_items(ModuleId { krate, module_id })) 44 .filter_map(|(local_id, _)| db.module_lang_items(ModuleId { krate, local_id }))
45 .for_each(|it| lang_items.items.extend(it.items.iter().map(|(k, v)| (k.clone(), *v)))); 45 .for_each(|it| lang_items.items.extend(it.items.iter().map(|(k, v)| (k.clone(), *v))));
46 46
47 Arc::new(lang_items) 47 Arc::new(lang_items)
@@ -80,7 +80,7 @@ impl LangItems {
80 fn collect_lang_items(&mut self, db: &impl DefDatabase, module: ModuleId) { 80 fn collect_lang_items(&mut self, db: &impl DefDatabase, module: ModuleId) {
81 // Look for impl targets 81 // Look for impl targets
82 let def_map = db.crate_def_map(module.krate); 82 let def_map = db.crate_def_map(module.krate);
83 let module_data = &def_map[module.module_id]; 83 let module_data = &def_map[module.local_id];
84 for &impl_block in module_data.impls.iter() { 84 for &impl_block in module_data.impls.iter() {
85 self.collect_lang_item(db, impl_block, LangItemTarget::ImplBlockId) 85 self.collect_lang_item(db, impl_block, LangItemTarget::ImplBlockId)
86 } 86 }
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs
index ddf464c60..bc5530896 100644
--- a/crates/ra_hir_def/src/lib.rs
+++ b/crates/ra_hir_def/src/lib.rs
@@ -50,7 +50,7 @@ impl_arena_id!(LocalImportId);
50#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 50#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
51pub struct ModuleId { 51pub struct ModuleId {
52 pub krate: CrateId, 52 pub krate: CrateId,
53 pub module_id: LocalModuleId, 53 pub local_id: LocalModuleId,
54} 54}
55 55
56/// An ID of a module, **local** to a specific crate 56/// An ID of a module, **local** to a specific crate
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs
index ea3abfdae..603b49738 100644
--- a/crates/ra_hir_def/src/nameres/collector.rs
+++ b/crates/ra_hir_def/src/nameres/collector.rs
@@ -37,7 +37,7 @@ pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> C
37 log::debug!("crate dep {:?} -> {:?}", dep.name, dep.crate_id); 37 log::debug!("crate dep {:?} -> {:?}", dep.name, dep.crate_id);
38 def_map.extern_prelude.insert( 38 def_map.extern_prelude.insert(
39 dep.as_name(), 39 dep.as_name(),
40 ModuleId { krate: dep.crate_id, module_id: dep_def_map.root }.into(), 40 ModuleId { krate: dep.crate_id, local_id: dep_def_map.root }.into(),
41 ); 41 );
42 42
43 // look for the prelude 43 // look for the prelude
@@ -323,7 +323,7 @@ where
323 tested_by!(glob_across_crates); 323 tested_by!(glob_across_crates);
324 // glob import from other crate => we can just import everything once 324 // glob import from other crate => we can just import everything once
325 let item_map = self.db.crate_def_map(m.krate); 325 let item_map = self.db.crate_def_map(m.krate);
326 let scope = &item_map[m.module_id].scope; 326 let scope = &item_map[m.local_id].scope;
327 327
328 // Module scoped macros is included 328 // Module scoped macros is included
329 let items = scope 329 let items = scope
@@ -337,7 +337,7 @@ where
337 // glob import from same crate => we do an initial 337 // glob import from same crate => we do an initial
338 // import, and then need to propagate any further 338 // import, and then need to propagate any further
339 // additions 339 // additions
340 let scope = &self.def_map[m.module_id].scope; 340 let scope = &self.def_map[m.local_id].scope;
341 341
342 // Module scoped macros is included 342 // Module scoped macros is included
343 let items = scope 343 let items = scope
@@ -349,7 +349,7 @@ where
349 self.update(module_id, Some(import_id), &items); 349 self.update(module_id, Some(import_id), &items);
350 // record the glob import in case we add further items 350 // record the glob import in case we add further items
351 self.glob_imports 351 self.glob_imports
352 .entry(m.module_id) 352 .entry(m.local_id)
353 .or_default() 353 .or_default()
354 .push((module_id, import_id)); 354 .push((module_id, import_id));
355 } 355 }
@@ -590,7 +590,7 @@ where
590 raw::RawItemKind::Impl(imp) => { 590 raw::RawItemKind::Impl(imp) => {
591 let module = ModuleId { 591 let module = ModuleId {
592 krate: self.def_collector.def_map.krate, 592 krate: self.def_collector.def_map.krate,
593 module_id: self.module_id, 593 local_id: self.module_id,
594 }; 594 };
595 let ctx = LocationCtx::new(self.def_collector.db, module, self.file_id); 595 let ctx = LocationCtx::new(self.def_collector.db, module, self.file_id);
596 let imp_id = ImplId::from_ast_id(ctx, self.raw_items[imp].ast_id); 596 let imp_id = ImplId::from_ast_id(ctx, self.raw_items[imp].ast_id);
@@ -673,7 +673,7 @@ where
673 modules[self.module_id].children.insert(name.clone(), res); 673 modules[self.module_id].children.insert(name.clone(), res);
674 let resolution = Resolution { 674 let resolution = Resolution {
675 def: PerNs::types( 675 def: PerNs::types(
676 ModuleId { krate: self.def_collector.def_map.krate, module_id: res }.into(), 676 ModuleId { krate: self.def_collector.def_map.krate, local_id: res }.into(),
677 ), 677 ),
678 import: None, 678 import: None,
679 }; 679 };
@@ -682,8 +682,7 @@ where
682 } 682 }
683 683
684 fn define_def(&mut self, def: &raw::DefData) { 684 fn define_def(&mut self, def: &raw::DefData) {
685 let module = 685 let module = ModuleId { krate: self.def_collector.def_map.krate, local_id: self.module_id };
686 ModuleId { krate: self.def_collector.def_map.krate, module_id: self.module_id };
687 let ctx = LocationCtx::new(self.def_collector.db, module, self.file_id); 686 let ctx = LocationCtx::new(self.def_collector.db, module, self.file_id);
688 687
689 let name = def.name.clone(); 688 let name = def.name.clone();
diff --git a/crates/ra_hir_def/src/nameres/path_resolution.rs b/crates/ra_hir_def/src/nameres/path_resolution.rs
index 9455f22bb..b72c55bd1 100644
--- a/crates/ra_hir_def/src/nameres/path_resolution.rs
+++ b/crates/ra_hir_def/src/nameres/path_resolution.rs
@@ -74,19 +74,19 @@ impl CrateDefMap {
74 PathKind::DollarCrate(krate) => { 74 PathKind::DollarCrate(krate) => {
75 if krate == self.krate { 75 if krate == self.krate {
76 tested_by!(macro_dollar_crate_self); 76 tested_by!(macro_dollar_crate_self);
77 PerNs::types(ModuleId { krate: self.krate, module_id: self.root }.into()) 77 PerNs::types(ModuleId { krate: self.krate, local_id: self.root }.into())
78 } else { 78 } else {
79 let def_map = db.crate_def_map(krate); 79 let def_map = db.crate_def_map(krate);
80 let module = ModuleId { krate, module_id: def_map.root }; 80 let module = ModuleId { krate, local_id: def_map.root };
81 tested_by!(macro_dollar_crate_other); 81 tested_by!(macro_dollar_crate_other);
82 PerNs::types(module.into()) 82 PerNs::types(module.into())
83 } 83 }
84 } 84 }
85 PathKind::Crate => { 85 PathKind::Crate => {
86 PerNs::types(ModuleId { krate: self.krate, module_id: self.root }.into()) 86 PerNs::types(ModuleId { krate: self.krate, local_id: self.root }.into())
87 } 87 }
88 PathKind::Self_ => { 88 PathKind::Self_ => {
89 PerNs::types(ModuleId { krate: self.krate, module_id: original_module }.into()) 89 PerNs::types(ModuleId { krate: self.krate, local_id: original_module }.into())
90 } 90 }
91 // plain import or absolute path in 2015: crate-relative with 91 // plain import or absolute path in 2015: crate-relative with
92 // fallback to extern prelude (with the simplification in 92 // fallback to extern prelude (with the simplification in
@@ -113,7 +113,7 @@ impl CrateDefMap {
113 } 113 }
114 PathKind::Super => { 114 PathKind::Super => {
115 if let Some(p) = self.modules[original_module].parent { 115 if let Some(p) = self.modules[original_module].parent {
116 PerNs::types(ModuleId { krate: self.krate, module_id: p }.into()) 116 PerNs::types(ModuleId { krate: self.krate, local_id: p }.into())
117 } else { 117 } else {
118 log::debug!("super path in root module"); 118 log::debug!("super path in root module");
119 return ResolvePathResult::empty(ReachedFixedPoint::Yes); 119 return ResolvePathResult::empty(ReachedFixedPoint::Yes);
@@ -160,7 +160,7 @@ impl CrateDefMap {
160 Path { segments: path.segments[i..].to_vec(), kind: PathKind::Self_ }; 160 Path { segments: path.segments[i..].to_vec(), kind: PathKind::Self_ };
161 log::debug!("resolving {:?} in other crate", path); 161 log::debug!("resolving {:?} in other crate", path);
162 let defp_map = db.crate_def_map(module.krate); 162 let defp_map = db.crate_def_map(module.krate);
163 let (def, s) = defp_map.resolve_path(db, module.module_id, &path); 163 let (def, s) = defp_map.resolve_path(db, module.local_id, &path);
164 return ResolvePathResult::with( 164 return ResolvePathResult::with(
165 def, 165 def,
166 ReachedFixedPoint::Yes, 166 ReachedFixedPoint::Yes,
@@ -169,7 +169,7 @@ impl CrateDefMap {
169 } 169 }
170 170
171 // Since it is a qualified path here, it should not contains legacy macros 171 // Since it is a qualified path here, it should not contains legacy macros
172 match self[module.module_id].scope.get(&segment.name) { 172 match self[module.local_id].scope.get(&segment.name) {
173 Some(res) => res.def, 173 Some(res) => res.def,
174 _ => { 174 _ => {
175 log::debug!("path segment {:?} not found", segment.name); 175 log::debug!("path segment {:?} not found", segment.name);
@@ -254,7 +254,7 @@ impl CrateDefMap {
254 keep = db.crate_def_map(prelude.krate); 254 keep = db.crate_def_map(prelude.krate);
255 &keep 255 &keep
256 }; 256 };
257 def_map[prelude.module_id].scope.get(name).map_or_else(PerNs::none, |res| res.def) 257 def_map[prelude.local_id].scope.get(name).map_or_else(PerNs::none, |res| res.def)
258 } else { 258 } else {
259 PerNs::none() 259 PerNs::none()
260 } 260 }
diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/ra_hir_def/src/resolver.rs
index 5155365cc..0847f6dcf 100644
--- a/crates/ra_hir_def/src/resolver.rs
+++ b/crates/ra_hir_def/src/resolver.rs
@@ -325,7 +325,7 @@ impl Resolver {
325 if let Scope::ModuleScope(m) = scope { 325 if let Scope::ModuleScope(m) = scope {
326 if let Some(prelude) = m.crate_def_map.prelude { 326 if let Some(prelude) = m.crate_def_map.prelude {
327 let prelude_def_map = db.crate_def_map(prelude.krate); 327 let prelude_def_map = db.crate_def_map(prelude.krate);
328 traits.extend(prelude_def_map[prelude.module_id].scope.traits()); 328 traits.extend(prelude_def_map[prelude.local_id].scope.traits());
329 } 329 }
330 traits.extend(m.crate_def_map[m.module_id].scope.traits()); 330 traits.extend(m.crate_def_map[m.module_id].scope.traits());
331 } 331 }
@@ -402,7 +402,7 @@ impl Scope {
402 }); 402 });
403 if let Some(prelude) = m.crate_def_map.prelude { 403 if let Some(prelude) = m.crate_def_map.prelude {
404 let prelude_def_map = db.crate_def_map(prelude.krate); 404 let prelude_def_map = db.crate_def_map(prelude.krate);
405 prelude_def_map[prelude.module_id].scope.entries().for_each(|(name, res)| { 405 prelude_def_map[prelude.local_id].scope.entries().for_each(|(name, res)| {
406 f(name.clone(), ScopeDef::PerNs(res.def)); 406 f(name.clone(), ScopeDef::PerNs(res.def));
407 }); 407 });
408 } 408 }
@@ -492,7 +492,7 @@ pub trait HasResolver: Copy {
492impl HasResolver for ModuleId { 492impl HasResolver for ModuleId {
493 fn resolver(self, db: &impl DefDatabase) -> Resolver { 493 fn resolver(self, db: &impl DefDatabase) -> Resolver {
494 let def_map = db.crate_def_map(self.krate); 494 let def_map = db.crate_def_map(self.krate);
495 Resolver::default().push_module_scope(def_map, self.module_id) 495 Resolver::default().push_module_scope(def_map, self.local_id)
496 } 496 }
497} 497}
498 498
diff --git a/crates/ra_hir_ty/src/test_db.rs b/crates/ra_hir_ty/src/test_db.rs
index 874357008..1dc9793f9 100644
--- a/crates/ra_hir_ty/src/test_db.rs
+++ b/crates/ra_hir_ty/src/test_db.rs
@@ -73,9 +73,9 @@ impl TestDB {
73 pub fn module_for_file(&self, file_id: FileId) -> ModuleId { 73 pub fn module_for_file(&self, file_id: FileId) -> ModuleId {
74 for &krate in self.relevant_crates(file_id).iter() { 74 for &krate in self.relevant_crates(file_id).iter() {
75 let crate_def_map = self.crate_def_map(krate); 75 let crate_def_map = self.crate_def_map(krate);
76 for (module_id, data) in crate_def_map.modules.iter() { 76 for (local_id, data) in crate_def_map.modules.iter() {
77 if data.definition == Some(file_id) { 77 if data.definition == Some(file_id) {
78 return ModuleId { krate, module_id }; 78 return ModuleId { krate, local_id };
79 } 79 }
80 } 80 }
81 } 81 }
diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/ra_hir_ty/src/tests.rs
index c1744663a..c8461b447 100644
--- a/crates/ra_hir_ty/src/tests.rs
+++ b/crates/ra_hir_ty/src/tests.rs
@@ -4677,7 +4677,7 @@ fn type_at_pos(db: &TestDB, pos: FilePosition) -> String {
4677 4677
4678 let module = db.module_for_file(pos.file_id); 4678 let module = db.module_for_file(pos.file_id);
4679 let crate_def_map = db.crate_def_map(module.krate); 4679 let crate_def_map = db.crate_def_map(module.krate);
4680 for decl in crate_def_map[module.module_id].scope.declarations() { 4680 for decl in crate_def_map[module.local_id].scope.declarations() {
4681 if let ModuleDefId::FunctionId(func) = decl { 4681 if let ModuleDefId::FunctionId(func) = decl {
4682 let (_body, source_map) = db.body_with_source_map(func.into()); 4682 let (_body, source_map) = db.body_with_source_map(func.into());
4683 if let Some(expr_id) = source_map.node_expr(Source::new(pos.file_id.into(), &expr)) { 4683 if let Some(expr_id) = source_map.node_expr(Source::new(pos.file_id.into(), &expr)) {
@@ -4753,7 +4753,7 @@ fn infer(content: &str) -> String {
4753 let crate_def_map = db.crate_def_map(module.krate); 4753 let crate_def_map = db.crate_def_map(module.krate);
4754 4754
4755 let mut defs: Vec<DefWithBodyId> = Vec::new(); 4755 let mut defs: Vec<DefWithBodyId> = Vec::new();
4756 visit_module(&db, &crate_def_map, module.module_id, &mut |it| defs.push(it)); 4756 visit_module(&db, &crate_def_map, module.local_id, &mut |it| defs.push(it));
4757 defs.sort_by_key(|def| match def { 4757 defs.sort_by_key(|def| match def {
4758 DefWithBodyId::FunctionId(it) => { 4758 DefWithBodyId::FunctionId(it) => {
4759 it.lookup(&db).ast_id.to_node(&db).syntax().text_range().start() 4759 it.lookup(&db).ast_id.to_node(&db).syntax().text_range().start()
@@ -4796,7 +4796,7 @@ fn visit_module(
4796 } 4796 }
4797 } 4797 }
4798 } 4798 }
4799 ModuleDefId::ModuleId(it) => visit_module(db, crate_def_map, it.module_id, cb), 4799 ModuleDefId::ModuleId(it) => visit_module(db, crate_def_map, it.local_id, cb),
4800 _ => (), 4800 _ => (),
4801 } 4801 }
4802 } 4802 }
@@ -4844,7 +4844,7 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() {
4844 let events = db.log_executed(|| { 4844 let events = db.log_executed(|| {
4845 let module = db.module_for_file(pos.file_id); 4845 let module = db.module_for_file(pos.file_id);
4846 let crate_def_map = db.crate_def_map(module.krate); 4846 let crate_def_map = db.crate_def_map(module.krate);
4847 visit_module(&db, &crate_def_map, module.module_id, &mut |def| { 4847 visit_module(&db, &crate_def_map, module.local_id, &mut |def| {
4848 db.infer(def); 4848 db.infer(def);
4849 }); 4849 });
4850 }); 4850 });
@@ -4866,7 +4866,7 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() {
4866 let events = db.log_executed(|| { 4866 let events = db.log_executed(|| {
4867 let module = db.module_for_file(pos.file_id); 4867 let module = db.module_for_file(pos.file_id);
4868 let crate_def_map = db.crate_def_map(module.krate); 4868 let crate_def_map = db.crate_def_map(module.krate);
4869 visit_module(&db, &crate_def_map, module.module_id, &mut |def| { 4869 visit_module(&db, &crate_def_map, module.local_id, &mut |def| {
4870 db.infer(def); 4870 db.infer(def);
4871 }); 4871 });
4872 }); 4872 });
diff --git a/crates/ra_ide_api/Cargo.toml b/crates/ra_ide/Cargo.toml
index 15346f388..e6383dd35 100644
--- a/crates/ra_ide_api/Cargo.toml
+++ b/crates/ra_ide/Cargo.toml
@@ -1,6 +1,6 @@
1[package] 1[package]
2edition = "2018" 2edition = "2018"
3name = "ra_ide_api" 3name = "ra_ide"
4version = "0.1.0" 4version = "0.1.0"
5authors = ["rust-analyzer developers"] 5authors = ["rust-analyzer developers"]
6 6
@@ -32,7 +32,7 @@ ra_prof = { path = "../ra_prof" }
32test_utils = { path = "../test_utils" } 32test_utils = { path = "../test_utils" }
33ra_assists = { path = "../ra_assists" } 33ra_assists = { path = "../ra_assists" }
34 34
35# ra_ide_api should depend only on the top-level `hir` package. if you need 35# ra_ide should depend only on the top-level `hir` package. if you need
36# something from some `hir_xxx` subpackage, reexport the API via `hir`. 36# something from some `hir_xxx` subpackage, reexport the API via `hir`.
37hir = { path = "../ra_hir", package = "ra_hir" } 37hir = { path = "../ra_hir", package = "ra_hir" }
38 38
diff --git a/crates/ra_ide_api/src/assists.rs b/crates/ra_ide/src/assists.rs
index e00589733..e00589733 100644
--- a/crates/ra_ide_api/src/assists.rs
+++ b/crates/ra_ide/src/assists.rs
diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide/src/call_info.rs
index d559dc4d0..d559dc4d0 100644
--- a/crates/ra_ide_api/src/call_info.rs
+++ b/crates/ra_ide/src/call_info.rs
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide/src/change.rs
index 4a76d1dd8..4a76d1dd8 100644
--- a/crates/ra_ide_api/src/change.rs
+++ b/crates/ra_ide/src/change.rs
diff --git a/crates/ra_ide_api/src/completion.rs b/crates/ra_ide/src/completion.rs
index abe1f36ce..abe1f36ce 100644
--- a/crates/ra_ide_api/src/completion.rs
+++ b/crates/ra_ide/src/completion.rs
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide/src/completion/complete_dot.rs
index b6fe48627..b6fe48627 100644
--- a/crates/ra_ide_api/src/completion/complete_dot.rs
+++ b/crates/ra_ide/src/completion/complete_dot.rs
diff --git a/crates/ra_ide_api/src/completion/complete_fn_param.rs b/crates/ra_ide/src/completion/complete_fn_param.rs
index 502458706..502458706 100644
--- a/crates/ra_ide_api/src/completion/complete_fn_param.rs
+++ b/crates/ra_ide/src/completion/complete_fn_param.rs
diff --git a/crates/ra_ide_api/src/completion/complete_keyword.rs b/crates/ra_ide/src/completion/complete_keyword.rs
index eb7cd9ac2..eb7cd9ac2 100644
--- a/crates/ra_ide_api/src/completion/complete_keyword.rs
+++ b/crates/ra_ide/src/completion/complete_keyword.rs
diff --git a/crates/ra_ide_api/src/completion/complete_macro_in_item_position.rs b/crates/ra_ide/src/completion/complete_macro_in_item_position.rs
index faadd1e3f..faadd1e3f 100644
--- a/crates/ra_ide_api/src/completion/complete_macro_in_item_position.rs
+++ b/crates/ra_ide/src/completion/complete_macro_in_item_position.rs
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide/src/completion/complete_path.rs
index 89e0009a1..89e0009a1 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide/src/completion/complete_path.rs
diff --git a/crates/ra_ide_api/src/completion/complete_pattern.rs b/crates/ra_ide/src/completion/complete_pattern.rs
index fd03b1c40..fd03b1c40 100644
--- a/crates/ra_ide_api/src/completion/complete_pattern.rs
+++ b/crates/ra_ide/src/completion/complete_pattern.rs
diff --git a/crates/ra_ide_api/src/completion/complete_postfix.rs b/crates/ra_ide/src/completion/complete_postfix.rs
index 646a30c76..646a30c76 100644
--- a/crates/ra_ide_api/src/completion/complete_postfix.rs
+++ b/crates/ra_ide/src/completion/complete_postfix.rs
diff --git a/crates/ra_ide_api/src/completion/complete_record_literal.rs b/crates/ra_ide/src/completion/complete_record_literal.rs
index 577c394d2..577c394d2 100644
--- a/crates/ra_ide_api/src/completion/complete_record_literal.rs
+++ b/crates/ra_ide/src/completion/complete_record_literal.rs
diff --git a/crates/ra_ide_api/src/completion/complete_record_pattern.rs b/crates/ra_ide/src/completion/complete_record_pattern.rs
index a56c7e3a1..a56c7e3a1 100644
--- a/crates/ra_ide_api/src/completion/complete_record_pattern.rs
+++ b/crates/ra_ide/src/completion/complete_record_pattern.rs
diff --git a/crates/ra_ide_api/src/completion/complete_scope.rs b/crates/ra_ide/src/completion/complete_scope.rs
index d5739b58a..d5739b58a 100644
--- a/crates/ra_ide_api/src/completion/complete_scope.rs
+++ b/crates/ra_ide/src/completion/complete_scope.rs
diff --git a/crates/ra_ide_api/src/completion/complete_snippet.rs b/crates/ra_ide/src/completion/complete_snippet.rs
index 1f2988b36..1f2988b36 100644
--- a/crates/ra_ide_api/src/completion/complete_snippet.rs
+++ b/crates/ra_ide/src/completion/complete_snippet.rs
diff --git a/crates/ra_ide_api/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs
index b8345c91d..b8345c91d 100644
--- a/crates/ra_ide_api/src/completion/completion_context.rs
+++ b/crates/ra_ide/src/completion/completion_context.rs
diff --git a/crates/ra_ide_api/src/completion/completion_item.rs b/crates/ra_ide/src/completion/completion_item.rs
index 93f336370..93f336370 100644
--- a/crates/ra_ide_api/src/completion/completion_item.rs
+++ b/crates/ra_ide/src/completion/completion_item.rs
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs
index 5f056730a..5f056730a 100644
--- a/crates/ra_ide_api/src/completion/presentation.rs
+++ b/crates/ra_ide/src/completion/presentation.rs
diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide/src/db.rs
index f739ebecd..f739ebecd 100644
--- a/crates/ra_ide_api/src/db.rs
+++ b/crates/ra_ide/src/db.rs
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs
index cc1ccab4b..cc1ccab4b 100644
--- a/crates/ra_ide_api/src/diagnostics.rs
+++ b/crates/ra_ide/src/diagnostics.rs
diff --git a/crates/ra_ide_api/src/display.rs b/crates/ra_ide/src/display.rs
index 30617412a..30617412a 100644
--- a/crates/ra_ide_api/src/display.rs
+++ b/crates/ra_ide/src/display.rs
diff --git a/crates/ra_ide_api/src/display/function_signature.rs b/crates/ra_ide/src/display/function_signature.rs
index d96de4e4c..d96de4e4c 100644
--- a/crates/ra_ide_api/src/display/function_signature.rs
+++ b/crates/ra_ide/src/display/function_signature.rs
diff --git a/crates/ra_ide_api/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs
index 6ac60722b..6ac60722b 100644
--- a/crates/ra_ide_api/src/display/navigation_target.rs
+++ b/crates/ra_ide/src/display/navigation_target.rs
diff --git a/crates/ra_ide_api/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs
index 9ffc9b980..9ffc9b980 100644
--- a/crates/ra_ide_api/src/display/short_label.rs
+++ b/crates/ra_ide/src/display/short_label.rs
diff --git a/crates/ra_ide_api/src/display/structure.rs b/crates/ra_ide/src/display/structure.rs
index a80d65ac7..a80d65ac7 100644
--- a/crates/ra_ide_api/src/display/structure.rs
+++ b/crates/ra_ide/src/display/structure.rs
diff --git a/crates/ra_ide_api/src/expand.rs b/crates/ra_ide/src/expand.rs
index 2f1abf509..2f1abf509 100644
--- a/crates/ra_ide_api/src/expand.rs
+++ b/crates/ra_ide/src/expand.rs
diff --git a/crates/ra_ide_api/src/expand_macro.rs b/crates/ra_ide/src/expand_macro.rs
index abc602244..abc602244 100644
--- a/crates/ra_ide_api/src/expand_macro.rs
+++ b/crates/ra_ide/src/expand_macro.rs
diff --git a/crates/ra_ide_api/src/extend_selection.rs b/crates/ra_ide/src/extend_selection.rs
index 4b7bfc0b1..4b7bfc0b1 100644
--- a/crates/ra_ide_api/src/extend_selection.rs
+++ b/crates/ra_ide/src/extend_selection.rs
diff --git a/crates/ra_ide_api/src/feature_flags.rs b/crates/ra_ide/src/feature_flags.rs
index de4ae513d..de4ae513d 100644
--- a/crates/ra_ide_api/src/feature_flags.rs
+++ b/crates/ra_ide/src/feature_flags.rs
diff --git a/crates/ra_ide_api/src/folding_ranges.rs b/crates/ra_ide/src/folding_ranges.rs
index 4eeb76d14..4eeb76d14 100644
--- a/crates/ra_ide_api/src/folding_ranges.rs
+++ b/crates/ra_ide/src/folding_ranges.rs
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs
index c10a6c844..c10a6c844 100644
--- a/crates/ra_ide_api/src/goto_definition.rs
+++ b/crates/ra_ide/src/goto_definition.rs
diff --git a/crates/ra_ide_api/src/goto_type_definition.rs b/crates/ra_ide/src/goto_type_definition.rs
index 992a08809..992a08809 100644
--- a/crates/ra_ide_api/src/goto_type_definition.rs
+++ b/crates/ra_ide/src/goto_type_definition.rs
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide/src/hover.rs
index 260a7b869..260a7b869 100644
--- a/crates/ra_ide_api/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
diff --git a/crates/ra_ide_api/src/impls.rs b/crates/ra_ide/src/impls.rs
index aa480e399..aa480e399 100644
--- a/crates/ra_ide_api/src/impls.rs
+++ b/crates/ra_ide/src/impls.rs
diff --git a/crates/ra_ide_api/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs
index 45149bf0c..45149bf0c 100644
--- a/crates/ra_ide_api/src/inlay_hints.rs
+++ b/crates/ra_ide/src/inlay_hints.rs
diff --git a/crates/ra_ide_api/src/join_lines.rs b/crates/ra_ide/src/join_lines.rs
index 7deeb3494..7deeb3494 100644
--- a/crates/ra_ide_api/src/join_lines.rs
+++ b/crates/ra_ide/src/join_lines.rs
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide/src/lib.rs
index cb6c24eaa..d1bff4a76 100644
--- a/crates/ra_ide_api/src/lib.rs
+++ b/crates/ra_ide/src/lib.rs
@@ -1,4 +1,4 @@
1//! ra_ide_api crate provides "ide-centric" APIs for the rust-analyzer. That is, 1//! ra_ide crate provides "ide-centric" APIs for the rust-analyzer. That is,
2//! it generally operates with files and text ranges, and returns results as 2//! it generally operates with files and text ranges, and returns results as
3//! Strings, suitable for displaying to the human. 3//! Strings, suitable for displaying to the human.
4//! 4//!
diff --git a/crates/ra_ide_api/src/line_index.rs b/crates/ra_ide/src/line_index.rs
index 710890d27..710890d27 100644
--- a/crates/ra_ide_api/src/line_index.rs
+++ b/crates/ra_ide/src/line_index.rs
diff --git a/crates/ra_ide_api/src/line_index_utils.rs b/crates/ra_ide/src/line_index_utils.rs
index bd1e08feb..bd1e08feb 100644
--- a/crates/ra_ide_api/src/line_index_utils.rs
+++ b/crates/ra_ide/src/line_index_utils.rs
diff --git a/crates/ra_ide_api/src/marks.rs b/crates/ra_ide/src/marks.rs
index 848ae4dc7..848ae4dc7 100644
--- a/crates/ra_ide_api/src/marks.rs
+++ b/crates/ra_ide/src/marks.rs
diff --git a/crates/ra_ide_api/src/matching_brace.rs b/crates/ra_ide/src/matching_brace.rs
index d1204fac0..d1204fac0 100644
--- a/crates/ra_ide_api/src/matching_brace.rs
+++ b/crates/ra_ide/src/matching_brace.rs
diff --git a/crates/ra_ide_api/src/mock_analysis.rs b/crates/ra_ide/src/mock_analysis.rs
index bf8a54932..bf8a54932 100644
--- a/crates/ra_ide_api/src/mock_analysis.rs
+++ b/crates/ra_ide/src/mock_analysis.rs
diff --git a/crates/ra_ide_api/src/parent_module.rs b/crates/ra_ide/src/parent_module.rs
index 6027e7d54..6027e7d54 100644
--- a/crates/ra_ide_api/src/parent_module.rs
+++ b/crates/ra_ide/src/parent_module.rs
diff --git a/crates/ra_ide_api/src/references.rs b/crates/ra_ide/src/references.rs
index 21a1ea69e..21a1ea69e 100644
--- a/crates/ra_ide_api/src/references.rs
+++ b/crates/ra_ide/src/references.rs
diff --git a/crates/ra_ide_api/src/references/classify.rs b/crates/ra_ide/src/references/classify.rs
index 5cea805ec..5cea805ec 100644
--- a/crates/ra_ide_api/src/references/classify.rs
+++ b/crates/ra_ide/src/references/classify.rs
diff --git a/crates/ra_ide_api/src/references/name_definition.rs b/crates/ra_ide/src/references/name_definition.rs
index 10d3a2364..10d3a2364 100644
--- a/crates/ra_ide_api/src/references/name_definition.rs
+++ b/crates/ra_ide/src/references/name_definition.rs
diff --git a/crates/ra_ide_api/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs
index d58496049..d58496049 100644
--- a/crates/ra_ide_api/src/references/rename.rs
+++ b/crates/ra_ide/src/references/rename.rs
diff --git a/crates/ra_ide_api/src/references/search_scope.rs b/crates/ra_ide/src/references/search_scope.rs
index f5c9589f4..f5c9589f4 100644
--- a/crates/ra_ide_api/src/references/search_scope.rs
+++ b/crates/ra_ide/src/references/search_scope.rs
diff --git a/crates/ra_ide_api/src/runnables.rs b/crates/ra_ide/src/runnables.rs
index 8039a5164..8039a5164 100644
--- a/crates/ra_ide_api/src/runnables.rs
+++ b/crates/ra_ide/src/runnables.rs
diff --git a/crates/ra_ide_api/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html
index b39c4d371..b39c4d371 100644
--- a/crates/ra_ide_api/src/snapshots/highlighting.html
+++ b/crates/ra_ide/src/snapshots/highlighting.html
diff --git a/crates/ra_ide_api/src/snapshots/rainbow_highlighting.html b/crates/ra_ide/src/snapshots/rainbow_highlighting.html
index 79f11ea80..79f11ea80 100644
--- a/crates/ra_ide_api/src/snapshots/rainbow_highlighting.html
+++ b/crates/ra_ide/src/snapshots/rainbow_highlighting.html
diff --git a/crates/ra_ide_api/src/source_change.rs b/crates/ra_ide/src/source_change.rs
index f5f7f8807..f5f7f8807 100644
--- a/crates/ra_ide_api/src/source_change.rs
+++ b/crates/ra_ide/src/source_change.rs
diff --git a/crates/ra_ide_api/src/status.rs b/crates/ra_ide/src/status.rs
index 1bb27eb85..1bb27eb85 100644
--- a/crates/ra_ide_api/src/status.rs
+++ b/crates/ra_ide/src/status.rs
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide/src/symbol_index.rs
index 5729eb5b3..5729eb5b3 100644
--- a/crates/ra_ide_api/src/symbol_index.rs
+++ b/crates/ra_ide/src/symbol_index.rs
diff --git a/crates/ra_ide_api/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 10165a9bb..9a3e4c82f 100644
--- a/crates/ra_ide_api/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -306,7 +306,7 @@ fn main() {
306"# 306"#
307 .trim(), 307 .trim(),
308 ); 308 );
309 let dst_file = project_dir().join("crates/ra_ide_api/src/snapshots/highlighting.html"); 309 let dst_file = project_dir().join("crates/ra_ide/src/snapshots/highlighting.html");
310 let actual_html = &analysis.highlight_as_html(file_id, false).unwrap(); 310 let actual_html = &analysis.highlight_as_html(file_id, false).unwrap();
311 let expected_html = &read_text(&dst_file); 311 let expected_html = &read_text(&dst_file);
312 std::fs::write(dst_file, &actual_html).unwrap(); 312 std::fs::write(dst_file, &actual_html).unwrap();
@@ -332,8 +332,7 @@ fn bar() {
332"# 332"#
333 .trim(), 333 .trim(),
334 ); 334 );
335 let dst_file = 335 let dst_file = project_dir().join("crates/ra_ide/src/snapshots/rainbow_highlighting.html");
336 project_dir().join("crates/ra_ide_api/src/snapshots/rainbow_highlighting.html");
337 let actual_html = &analysis.highlight_as_html(file_id, true).unwrap(); 336 let actual_html = &analysis.highlight_as_html(file_id, true).unwrap();
338 let expected_html = &read_text(&dst_file); 337 let expected_html = &read_text(&dst_file);
339 std::fs::write(dst_file, &actual_html).unwrap(); 338 std::fs::write(dst_file, &actual_html).unwrap();
diff --git a/crates/ra_ide_api/src/syntax_tree.rs b/crates/ra_ide/src/syntax_tree.rs
index 4d0f0fc47..4d0f0fc47 100644
--- a/crates/ra_ide_api/src/syntax_tree.rs
+++ b/crates/ra_ide/src/syntax_tree.rs
diff --git a/crates/ra_ide_api/src/test_utils.rs b/crates/ra_ide/src/test_utils.rs
index 8adb214d4..8adb214d4 100644
--- a/crates/ra_ide_api/src/test_utils.rs
+++ b/crates/ra_ide/src/test_utils.rs
diff --git a/crates/ra_ide_api/src/typing.rs b/crates/ra_ide/src/typing.rs
index 21e5be9b3..21e5be9b3 100644
--- a/crates/ra_ide_api/src/typing.rs
+++ b/crates/ra_ide/src/typing.rs
diff --git a/crates/ra_ide_api/src/wasm_shims.rs b/crates/ra_ide/src/wasm_shims.rs
index 088cc9be4..088cc9be4 100644
--- a/crates/ra_ide_api/src/wasm_shims.rs
+++ b/crates/ra_ide/src/wasm_shims.rs
diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/ra_lsp_server/Cargo.toml
index 58b9cfaa0..21aef842c 100644
--- a/crates/ra_lsp_server/Cargo.toml
+++ b/crates/ra_lsp_server/Cargo.toml
@@ -22,7 +22,7 @@ jod-thread = "0.1.0"
22ra_vfs = "0.5.0" 22ra_vfs = "0.5.0"
23ra_syntax = { path = "../ra_syntax" } 23ra_syntax = { path = "../ra_syntax" }
24ra_text_edit = { path = "../ra_text_edit" } 24ra_text_edit = { path = "../ra_text_edit" }
25ra_ide_api = { path = "../ra_ide_api" } 25ra_ide = { path = "../ra_ide" }
26lsp-server = "0.3.0" 26lsp-server = "0.3.0"
27ra_project_model = { path = "../ra_project_model" } 27ra_project_model = { path = "../ra_project_model" }
28ra_prof = { path = "../ra_prof" } 28ra_prof = { path = "../ra_prof" }
diff --git a/crates/ra_lsp_server/src/cargo_target_spec.rs b/crates/ra_lsp_server/src/cargo_target_spec.rs
index d996b53de..c4a9e7101 100644
--- a/crates/ra_lsp_server/src/cargo_target_spec.rs
+++ b/crates/ra_lsp_server/src/cargo_target_spec.rs
@@ -1,6 +1,6 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use ra_ide_api::{FileId, RunnableKind}; 3use ra_ide::{FileId, RunnableKind};
4use ra_project_model::{self, ProjectWorkspace, TargetKind}; 4use ra_project_model::{self, ProjectWorkspace, TargetKind};
5 5
6use crate::{world::WorldSnapshot, Result}; 6use crate::{world::WorldSnapshot, Result};
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs
index 94ed619fa..b13093cfe 100644
--- a/crates/ra_lsp_server/src/conv.rs
+++ b/crates/ra_lsp_server/src/conv.rs
@@ -6,7 +6,7 @@ use lsp_types::{
6 SymbolKind, TextDocumentEdit, TextDocumentIdentifier, TextDocumentItem, 6 SymbolKind, TextDocumentEdit, TextDocumentIdentifier, TextDocumentItem,
7 TextDocumentPositionParams, Url, VersionedTextDocumentIdentifier, WorkspaceEdit, 7 TextDocumentPositionParams, Url, VersionedTextDocumentIdentifier, WorkspaceEdit,
8}; 8};
9use ra_ide_api::{ 9use ra_ide::{
10 translate_offset_with_edit, CompletionItem, CompletionItemKind, FileId, FilePosition, 10 translate_offset_with_edit, CompletionItem, CompletionItemKind, FileId, FilePosition,
11 FileRange, FileSystemEdit, Fold, FoldKind, InsertTextFormat, LineCol, LineIndex, 11 FileRange, FileSystemEdit, Fold, FoldKind, InsertTextFormat, LineCol, LineIndex,
12 NavigationTarget, RangeInfo, Severity, SourceChange, SourceFileEdit, 12 NavigationTarget, RangeInfo, Severity, SourceChange, SourceFileEdit,
@@ -173,7 +173,7 @@ impl ConvWith<&LineIndex> for Range {
173 } 173 }
174} 174}
175 175
176impl Conv for ra_ide_api::Documentation { 176impl Conv for ra_ide::Documentation {
177 type Output = lsp_types::Documentation; 177 type Output = lsp_types::Documentation;
178 fn conv(self) -> Documentation { 178 fn conv(self) -> Documentation {
179 Documentation::MarkupContent(MarkupContent { 179 Documentation::MarkupContent(MarkupContent {
@@ -183,7 +183,7 @@ impl Conv for ra_ide_api::Documentation {
183 } 183 }
184} 184}
185 185
186impl Conv for ra_ide_api::FunctionSignature { 186impl Conv for ra_ide::FunctionSignature {
187 type Output = lsp_types::SignatureInformation; 187 type Output = lsp_types::SignatureInformation;
188 fn conv(self) -> Self::Output { 188 fn conv(self) -> Self::Output {
189 use lsp_types::{ParameterInformation, ParameterLabel, SignatureInformation}; 189 use lsp_types::{ParameterInformation, ParameterLabel, SignatureInformation};
diff --git a/crates/ra_lsp_server/src/lib.rs b/crates/ra_lsp_server/src/lib.rs
index 9c36402b0..2ca149fd5 100644
--- a/crates/ra_lsp_server/src/lib.rs
+++ b/crates/ra_lsp_server/src/lib.rs
@@ -1,6 +1,6 @@
1//! Implementation of the LSP for rust-analyzer. 1//! Implementation of the LSP for rust-analyzer.
2//! 2//!
3//! This crate takes Rust-specific analysis results from ra_ide_api and 3//! This crate takes Rust-specific analysis results from ra_ide and
4//! translates into LSP types. 4//! translates into LSP types.
5//! 5//!
6//! It also is the root of all state. `world` module defines the bulk of the 6//! It also is the root of all state. `world` module defines the bulk of the
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index 0dc0aeee8..83845f1e0 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -9,7 +9,7 @@ use std::{error::Error, fmt, panic, path::PathBuf, sync::Arc, time::Instant};
9use crossbeam_channel::{select, unbounded, RecvError, Sender}; 9use crossbeam_channel::{select, unbounded, RecvError, Sender};
10use lsp_server::{Connection, ErrorCode, Message, Notification, Request, RequestId, Response}; 10use lsp_server::{Connection, ErrorCode, Message, Notification, Request, RequestId, Response};
11use lsp_types::{ClientCapabilities, NumberOrString}; 11use lsp_types::{ClientCapabilities, NumberOrString};
12use ra_ide_api::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId}; 12use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId};
13use ra_prof::profile; 13use ra_prof::profile;
14use ra_vfs::{VfsTask, Watch}; 14use ra_vfs::{VfsTask, Watch};
15use relative_path::RelativePathBuf; 15use relative_path::RelativePathBuf;
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index e552f2106..c81fa7f67 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -9,7 +9,7 @@ use lsp_types::{
9 Hover, HoverContents, Location, MarkupContent, MarkupKind, Position, PrepareRenameResponse, 9 Hover, HoverContents, Location, MarkupContent, MarkupKind, Position, PrepareRenameResponse,
10 Range, RenameParams, SymbolInformation, TextDocumentIdentifier, TextEdit, WorkspaceEdit, 10 Range, RenameParams, SymbolInformation, TextDocumentIdentifier, TextEdit, WorkspaceEdit,
11}; 11};
12use ra_ide_api::{ 12use ra_ide::{
13 AssistId, FileId, FilePosition, FileRange, Query, Runnable, RunnableKind, SearchScope, 13 AssistId, FileId, FilePosition, FileRange, Query, Runnable, RunnableKind, SearchScope,
14}; 14};
15use ra_prof::profile; 15use ra_prof::profile;
@@ -162,7 +162,7 @@ pub fn handle_on_type_formatting(
162 let line_index = world.analysis().file_line_index(position.file_id)?; 162 let line_index = world.analysis().file_line_index(position.file_id)?;
163 let line_endings = world.file_line_endings(position.file_id); 163 let line_endings = world.file_line_endings(position.file_id);
164 164
165 // in `ra_ide_api`, the `on_type` invariant is that 165 // in `ra_ide`, the `on_type` invariant is that
166 // `text.char_at(position) == typed_char`. 166 // `text.char_at(position) == typed_char`.
167 position.offset = position.offset - TextUnit::of_char('.'); 167 position.offset = position.offset - TextUnit::of_char('.');
168 let char_typed = params.ch.chars().next().unwrap_or('\0'); 168 let char_typed = params.ch.chars().next().unwrap_or('\0');
@@ -894,7 +894,7 @@ pub fn handle_inlay_hints(
894 label: api_type.label.to_string(), 894 label: api_type.label.to_string(),
895 range: api_type.range.conv_with(&line_index), 895 range: api_type.range.conv_with(&line_index),
896 kind: match api_type.kind { 896 kind: match api_type.kind {
897 ra_ide_api::InlayKind::TypeHint => InlayKind::TypeHint, 897 ra_ide::InlayKind::TypeHint => InlayKind::TypeHint,
898 }, 898 },
899 }) 899 })
900 .collect()) 900 .collect())
diff --git a/crates/ra_lsp_server/src/main_loop/subscriptions.rs b/crates/ra_lsp_server/src/main_loop/subscriptions.rs
index 3856263b0..609b2adcc 100644
--- a/crates/ra_lsp_server/src/main_loop/subscriptions.rs
+++ b/crates/ra_lsp_server/src/main_loop/subscriptions.rs
@@ -1,6 +1,6 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use ra_ide_api::FileId; 3use ra_ide::FileId;
4use rustc_hash::FxHashSet; 4use rustc_hash::FxHashSet;
5 5
6#[derive(Default, Debug)] 6#[derive(Default, Debug)]
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs
index 9bdea70c7..927449b45 100644
--- a/crates/ra_lsp_server/src/world.rs
+++ b/crates/ra_lsp_server/src/world.rs
@@ -9,7 +9,7 @@ use crossbeam_channel::{unbounded, Receiver};
9use lsp_server::ErrorCode; 9use lsp_server::ErrorCode;
10use lsp_types::Url; 10use lsp_types::Url;
11use parking_lot::RwLock; 11use parking_lot::RwLock;
12use ra_ide_api::{ 12use ra_ide::{
13 Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData, 13 Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData,
14 SourceRootId, 14 SourceRootId,
15}; 15};