Skip to content

Commit 360f6b7

Browse files
bors[bot]matklad
andauthored
Merge #2430
2430: rename ra_ide_api -> ra_ide r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 parents 4946169 + 27b362b commit 360f6b7

File tree

94 files changed

+97
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+97
-100
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frls-2.2E0
5656

5757
## Quick Links
5858

59-
* API docs: https://rust-analyzer.github.io/rust-analyzer/ra_ide_api/
59+
* API docs: https://rust-analyzer.github.io/rust-analyzer/ra_ide/
6060

6161

6262
## License

crates/ra_batch/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ crossbeam-channel = "0.4.0"
1515
ra_vfs = "0.5.0"
1616
ra_vfs_glob = { path = "../ra_vfs_glob" }
1717
ra_db = { path = "../ra_db" }
18-
ra_ide_api = { path = "../ra_ide_api" }
18+
ra_ide = { path = "../ra_ide" }
1919
ra_hir = { path = "../ra_hir" }
2020
ra_project_model = { path = "../ra_project_model" }

crates/ra_batch/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_hash::FxHashMap;
66

77
use crossbeam_channel::{unbounded, Receiver};
88
use ra_db::{CrateGraph, FileId, SourceRootId};
9-
use ra_ide_api::{AnalysisChange, AnalysisHost, FeatureFlags};
9+
use ra_ide::{AnalysisChange, AnalysisHost, FeatureFlags};
1010
use ra_project_model::{get_rustc_cfg_options, PackageRoot, ProjectWorkspace};
1111
use ra_vfs::{RootEntry, Vfs, VfsChange, VfsTask, Watch};
1212
use ra_vfs_glob::RustPackageFilterBuilder;

crates/ra_cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pico-args = "0.3.0"
1010
flexi_logger = "0.14.0"
1111

1212
ra_syntax = { path = "../ra_syntax" }
13-
ra_ide_api = { path = "../ra_ide_api" }
13+
ra_ide = { path = "../ra_ide" }
1414
ra_batch = { path = "../ra_batch" }
1515
ra_hir = { path = "../ra_hir" }
1616
ra_db = { path = "../ra_db" }

crates/ra_cli/src/analysis_bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use ra_db::{
1010
salsa::{Database, Durability},
1111
FileId, SourceDatabaseExt,
1212
};
13-
use ra_ide_api::{Analysis, AnalysisChange, AnalysisHost, FilePosition, LineCol};
13+
use ra_ide::{Analysis, AnalysisChange, AnalysisHost, FilePosition, LineCol};
1414

1515
use crate::Result;
1616

crates/ra_cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::{error::Error, fmt::Write, io::Read};
99

1010
use flexi_logger::Logger;
1111
use pico_args::Arguments;
12-
use ra_ide_api::{file_structure, Analysis};
12+
use ra_ide::{file_structure, Analysis};
1313
use ra_prof::profile;
1414
use ra_syntax::{AstNode, SourceFile};
1515

crates/ra_db/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.
22
mod cancellation;
33
mod input;
44
pub mod fixture;

crates/ra_hir/src/code_model.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ pub use hir_def::attr::Attrs;
174174

175175
impl Module {
176176
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 } }
178178
}
179179

180180
/// Name of this module.
181181
pub fn name(self, db: &impl DefDatabase) -> Option<Name> {
182182
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?;
184184
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 {
186186
Some(name.clone())
187187
} else {
188188
None
@@ -206,14 +206,14 @@ impl Module {
206206
/// Finds a child module with the specified name.
207207
pub fn child(self, db: &impl DefDatabase, name: &Name) -> Option<Module> {
208208
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)?;
210210
Some(self.with_module_id(*child_id))
211211
}
212212

213213
/// Iterates over all child modules.
214214
pub fn children(self, db: &impl DefDatabase) -> impl Iterator<Item = Module> {
215215
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]
217217
.children
218218
.iter()
219219
.map(|(_, module_id)| self.with_module_id(*module_id))
@@ -224,7 +224,7 @@ impl Module {
224224
/// Finds a parent module.
225225
pub fn parent(self, db: &impl DefDatabase) -> Option<Module> {
226226
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?;
228228
Some(self.with_module_id(parent_id))
229229
}
230230

@@ -240,7 +240,7 @@ impl Module {
240240

241241
/// Returns a `ModuleScope`: a set of items, visible in this module.
242242
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]
244244
.scope
245245
.entries()
246246
.map(|(name, res)| {
@@ -250,7 +250,7 @@ impl Module {
250250
}
251251

252252
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);
254254
for decl in self.declarations(db) {
255255
match decl {
256256
crate::ModuleDef::Function(f) => f.diagnostics(db, sink),
@@ -275,12 +275,12 @@ impl Module {
275275

276276
pub fn declarations(self, db: &impl DefDatabase) -> Vec<ModuleDef> {
277277
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()
279279
}
280280

281281
pub fn impl_blocks(self, db: &impl DefDatabase) -> Vec<ImplBlock> {
282282
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()
284284
}
285285

286286
fn with_module_id(self, module_id: LocalModuleId) -> Module {

crates/ra_hir/src/code_model/src.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl Module {
2222
/// Returns a node which defines this module. That is, a file or a `mod foo {}` with items.
2323
pub fn definition_source(self, db: &impl DefDatabase) -> Source<ModuleSource> {
2424
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);
2626
src.map(|it| match it {
2727
Either::A(it) => ModuleSource::SourceFile(it),
2828
Either::B(it) => ModuleSource::Module(it),
@@ -33,7 +33,7 @@ impl Module {
3333
/// `None` for the crate root.
3434
pub fn declaration_source(self, db: &impl DefDatabase) -> Option<Source<ast::Module>> {
3535
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)
3737
}
3838
}
3939

0 commit comments

Comments
 (0)