Merge #5747
5747: Rename crate r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
e9926948ca
144 changed files with 262 additions and 263 deletions
144
Cargo.lock
generated
144
Cargo.lock
generated
|
|
@ -83,6 +83,21 @@ version = "0.12.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
|
||||
|
||||
[[package]]
|
||||
name = "base_db"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"cfg",
|
||||
"profile",
|
||||
"rustc-hash",
|
||||
"salsa",
|
||||
"stdx",
|
||||
"syntax",
|
||||
"test_utils",
|
||||
"tt",
|
||||
"vfs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
|
|
@ -448,6 +463,50 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hir_def"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"anymap",
|
||||
"arena",
|
||||
"base_db",
|
||||
"cfg",
|
||||
"drop_bomb",
|
||||
"either",
|
||||
"expect",
|
||||
"fst",
|
||||
"hir_expand",
|
||||
"indexmap",
|
||||
"itertools",
|
||||
"log",
|
||||
"mbe",
|
||||
"once_cell",
|
||||
"profile",
|
||||
"rustc-hash",
|
||||
"smallvec",
|
||||
"stdx",
|
||||
"syntax",
|
||||
"test_utils",
|
||||
"tt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hir_expand"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"arena",
|
||||
"base_db",
|
||||
"either",
|
||||
"log",
|
||||
"mbe",
|
||||
"parser",
|
||||
"profile",
|
||||
"rustc-hash",
|
||||
"syntax",
|
||||
"test_utils",
|
||||
"tt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "home"
|
||||
version = "0.5.3"
|
||||
|
|
@ -956,12 +1015,12 @@ version = "0.0.0"
|
|||
dependencies = [
|
||||
"anyhow",
|
||||
"arena",
|
||||
"base_db",
|
||||
"cargo_metadata",
|
||||
"cfg",
|
||||
"log",
|
||||
"paths",
|
||||
"proc_macro_api",
|
||||
"ra_db",
|
||||
"rustc-hash",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
|
@ -982,10 +1041,10 @@ dependencies = [
|
|||
name = "ra_assists"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base_db",
|
||||
"either",
|
||||
"itertools",
|
||||
"profile",
|
||||
"ra_db",
|
||||
"ra_hir",
|
||||
"ra_ide_db",
|
||||
"rustc-hash",
|
||||
|
|
@ -995,100 +1054,41 @@ dependencies = [
|
|||
"text_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ra_db"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cfg",
|
||||
"profile",
|
||||
"rustc-hash",
|
||||
"salsa",
|
||||
"stdx",
|
||||
"syntax",
|
||||
"test_utils",
|
||||
"tt",
|
||||
"vfs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ra_hir"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"base_db",
|
||||
"either",
|
||||
"hir_def",
|
||||
"hir_expand",
|
||||
"itertools",
|
||||
"log",
|
||||
"profile",
|
||||
"ra_db",
|
||||
"ra_hir_def",
|
||||
"ra_hir_expand",
|
||||
"ra_hir_ty",
|
||||
"rustc-hash",
|
||||
"stdx",
|
||||
"syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ra_hir_def"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anymap",
|
||||
"arena",
|
||||
"cfg",
|
||||
"drop_bomb",
|
||||
"either",
|
||||
"expect",
|
||||
"fst",
|
||||
"indexmap",
|
||||
"itertools",
|
||||
"log",
|
||||
"mbe",
|
||||
"once_cell",
|
||||
"profile",
|
||||
"ra_db",
|
||||
"ra_hir_expand",
|
||||
"rustc-hash",
|
||||
"smallvec",
|
||||
"stdx",
|
||||
"syntax",
|
||||
"test_utils",
|
||||
"tt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ra_hir_expand"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arena",
|
||||
"either",
|
||||
"log",
|
||||
"mbe",
|
||||
"parser",
|
||||
"profile",
|
||||
"ra_db",
|
||||
"rustc-hash",
|
||||
"syntax",
|
||||
"test_utils",
|
||||
"tt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ra_hir_ty"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"arena",
|
||||
"arrayvec",
|
||||
"base_db",
|
||||
"chalk-ir",
|
||||
"chalk-recursive",
|
||||
"chalk-solve",
|
||||
"ena",
|
||||
"expect",
|
||||
"hir_def",
|
||||
"hir_expand",
|
||||
"itertools",
|
||||
"log",
|
||||
"profile",
|
||||
"ra_db",
|
||||
"ra_hir_def",
|
||||
"ra_hir_expand",
|
||||
"rustc-hash",
|
||||
"scoped-tls",
|
||||
"smallvec",
|
||||
|
|
@ -1104,6 +1104,7 @@ dependencies = [
|
|||
name = "ra_ide"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base_db",
|
||||
"cfg",
|
||||
"either",
|
||||
"expect",
|
||||
|
|
@ -1113,7 +1114,6 @@ dependencies = [
|
|||
"oorandom",
|
||||
"profile",
|
||||
"ra_assists",
|
||||
"ra_db",
|
||||
"ra_hir",
|
||||
"ra_ide_db",
|
||||
"ra_ssr",
|
||||
|
|
@ -1128,12 +1128,12 @@ dependencies = [
|
|||
name = "ra_ide_db"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base_db",
|
||||
"either",
|
||||
"fst",
|
||||
"log",
|
||||
"once_cell",
|
||||
"profile",
|
||||
"ra_db",
|
||||
"ra_hir",
|
||||
"rayon",
|
||||
"rustc-hash",
|
||||
|
|
@ -1147,8 +1147,8 @@ dependencies = [
|
|||
name = "ra_ssr"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base_db",
|
||||
"expect",
|
||||
"ra_db",
|
||||
"ra_hir",
|
||||
"ra_ide_db",
|
||||
"rustc-hash",
|
||||
|
|
@ -1230,11 +1230,13 @@ name = "rust-analyzer"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base_db",
|
||||
"cfg",
|
||||
"crossbeam-channel",
|
||||
"env_logger",
|
||||
"expect",
|
||||
"flycheck",
|
||||
"hir_def",
|
||||
"itertools",
|
||||
"jod-thread",
|
||||
"log",
|
||||
|
|
@ -1248,9 +1250,7 @@ dependencies = [
|
|||
"proc_macro_srv",
|
||||
"profile",
|
||||
"project_model",
|
||||
"ra_db",
|
||||
"ra_hir",
|
||||
"ra_hir_def",
|
||||
"ra_hir_ty",
|
||||
"ra_ide",
|
||||
"ra_ide_db",
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "ra_db"
|
||||
version = "0.1.0"
|
||||
authors = ["rust-analyzer developers"]
|
||||
name = "base_db"
|
||||
version = "0.0.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
authors = ["rust-analyzer developers"]
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
//! ra_db defines basic database traits. The concrete DB is defined by ra_ide.
|
||||
//! base_db defines basic database traits. The concrete DB is defined by ra_ide.
|
||||
mod cancellation;
|
||||
mod input;
|
||||
pub mod fixture;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "ra_hir_def"
|
||||
version = "0.1.0"
|
||||
authors = ["rust-analyzer developers"]
|
||||
name = "hir_def"
|
||||
version = "0.0.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
authors = ["rust-analyzer developers"]
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
@ -21,12 +21,11 @@ indexmap = "1.4.0"
|
|||
smallvec = "1.4.0"
|
||||
|
||||
stdx = { path = "../stdx" }
|
||||
|
||||
arena = { path = "../arena" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
base_db = { path = "../base_db" }
|
||||
syntax = { path = "../syntax" }
|
||||
profile = { path = "../profile" }
|
||||
hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
|
||||
hir_expand = { path = "../hir_expand" }
|
||||
test_utils = { path = "../test_utils" }
|
||||
mbe = { path = "../mbe" }
|
||||
cfg = { path = "../cfg" }
|
||||
|
|
@ -6,11 +6,11 @@ pub mod scope;
|
|||
use std::{mem, ops::Index, sync::Arc};
|
||||
|
||||
use arena::{map::ArenaMap, Arena};
|
||||
use base_db::CrateId;
|
||||
use cfg::CfgOptions;
|
||||
use drop_bomb::DropBomb;
|
||||
use either::Either;
|
||||
use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId};
|
||||
use ra_db::CrateId;
|
||||
use rustc_hash::FxHashMap;
|
||||
use syntax::{ast, AstNode, AstPtr};
|
||||
use test_utils::mark;
|
||||
|
|
@ -320,7 +320,7 @@ impl BodySourceMap {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ra_db::{fixture::WithFixture, SourceDatabase};
|
||||
use base_db::{fixture::WithFixture, SourceDatabase};
|
||||
use test_utils::mark;
|
||||
|
||||
use crate::ModuleDefId;
|
||||
|
|
@ -169,8 +169,8 @@ fn compute_expr_scopes(expr: ExprId, body: &Body, scopes: &mut ExprScopes, scope
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use base_db::{fixture::WithFixture, FileId, SourceDatabase};
|
||||
use hir_expand::{name::AsName, InFile};
|
||||
use ra_db::{fixture::WithFixture, FileId, SourceDatabase};
|
||||
use syntax::{algo::find_node_at_offset, ast, AstNode};
|
||||
use test_utils::{assert_eq_text, extract_offset, mark};
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
//! Defines database & queries for name resolution.
|
||||
use std::sync::Arc;
|
||||
|
||||
use base_db::{salsa, CrateId, SourceDatabase, Upcast};
|
||||
use hir_expand::{db::AstDatabase, HirFileId};
|
||||
use ra_db::{salsa, CrateId, SourceDatabase, Upcast};
|
||||
use syntax::SmolStr;
|
||||
|
||||
use crate::{
|
||||
|
|
@ -292,8 +292,8 @@ fn find_local_import_locations(
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use base_db::fixture::WithFixture;
|
||||
use hir_expand::hygiene::Hygiene;
|
||||
use ra_db::fixture::WithFixture;
|
||||
use syntax::ast::AstNode;
|
||||
use test_utils::mark;
|
||||
|
||||
|
|
@ -5,12 +5,12 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use arena::{map::ArenaMap, Arena};
|
||||
use base_db::FileId;
|
||||
use either::Either;
|
||||
use hir_expand::{
|
||||
name::{name, AsName, Name},
|
||||
InFile,
|
||||
};
|
||||
use ra_db::FileId;
|
||||
use syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner};
|
||||
|
||||
use crate::{
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
use std::{cmp::Ordering, fmt, hash::BuildHasherDefault, sync::Arc};
|
||||
|
||||
use base_db::CrateId;
|
||||
use fst::{self, Streamer};
|
||||
use indexmap::{map::Entry, IndexMap};
|
||||
use ra_db::CrateId;
|
||||
use rustc_hash::{FxHashMap, FxHasher};
|
||||
use smallvec::SmallVec;
|
||||
use syntax::SmolStr;
|
||||
|
|
@ -327,8 +327,8 @@ pub fn search_dependencies<'a>(
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use base_db::{fixture::WithFixture, SourceDatabase, Upcast};
|
||||
use expect::{expect, Expect};
|
||||
use ra_db::{fixture::WithFixture, SourceDatabase, Upcast};
|
||||
|
||||
use crate::{test_db::TestDB, AssocContainerId, Lookup};
|
||||
|
||||
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
use std::collections::hash_map::Entry;
|
||||
|
||||
use base_db::CrateId;
|
||||
use hir_expand::name::Name;
|
||||
use once_cell::sync::Lazy;
|
||||
use ra_db::CrateId;
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use test_utils::mark;
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
use base_db::fixture::WithFixture;
|
||||
use expect::{expect, Expect};
|
||||
use hir_expand::{db::AstDatabase, HirFileId, InFile};
|
||||
use ra_db::fixture::WithFixture;
|
||||
use rustc_hash::FxHashSet;
|
||||
use std::sync::Arc;
|
||||
use stdx::format_to;
|
||||
|
|
@ -246,13 +246,13 @@ fn smoke() {
|
|||
#[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct0"))] }, input: None }]) }]
|
||||
Struct { name: Name(Text("Struct0")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), fields: Unit, ast_id: FileAstId::<syntax::ast::generated::nodes::Struct>(3), kind: Unit }
|
||||
#[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct1"))] }, input: None }]) }]
|
||||
Struct { name: Name(Text("Struct1")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(2), fields: Tuple(IdRange::<ra_hir_def::item_tree::Field>(0..1)), ast_id: FileAstId::<syntax::ast::generated::nodes::Struct>(4), kind: Tuple }
|
||||
Struct { name: Name(Text("Struct1")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(2), fields: Tuple(IdRange::<hir_def::item_tree::Field>(0..1)), ast_id: FileAstId::<syntax::ast::generated::nodes::Struct>(4), kind: Tuple }
|
||||
#[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct2"))] }, input: None }]) }]
|
||||
Struct { name: Name(Text("Struct2")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(3), fields: Record(IdRange::<ra_hir_def::item_tree::Field>(1..2)), ast_id: FileAstId::<syntax::ast::generated::nodes::Struct>(5), kind: Record }
|
||||
Struct { name: Name(Text("Struct2")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(3), fields: Record(IdRange::<hir_def::item_tree::Field>(1..2)), ast_id: FileAstId::<syntax::ast::generated::nodes::Struct>(5), kind: Record }
|
||||
#[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("en"))] }, input: None }]) }]
|
||||
Enum { name: Name(Text("En")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), variants: IdRange::<ra_hir_def::item_tree::Variant>(0..1), ast_id: FileAstId::<syntax::ast::generated::nodes::Enum>(6) }
|
||||
Enum { name: Name(Text("En")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), variants: IdRange::<hir_def::item_tree::Variant>(0..1), ast_id: FileAstId::<syntax::ast::generated::nodes::Enum>(6) }
|
||||
#[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("un"))] }, input: None }]) }]
|
||||
Union { name: Name(Text("Un")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), fields: Record(IdRange::<ra_hir_def::item_tree::Field>(3..4)), ast_id: FileAstId::<syntax::ast::generated::nodes::Union>(7) }
|
||||
Union { name: Name(Text("Un")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), fields: Record(IdRange::<hir_def::item_tree::Field>(3..4)), ast_id: FileAstId::<syntax::ast::generated::nodes::Union>(7) }
|
||||
"##]],
|
||||
);
|
||||
}
|
||||
|
|
@ -53,11 +53,11 @@ mod test_db;
|
|||
use std::hash::{Hash, Hasher};
|
||||
|
||||
use arena::Idx;
|
||||
use base_db::{impl_intern_key, salsa, CrateId};
|
||||
use hir_expand::{
|
||||
ast_id_map::FileAstId, eager::expand_eager_macro, hygiene::Hygiene, AstId, HirFileId, InFile,
|
||||
MacroCallId, MacroCallKind, MacroDefId, MacroDefKind,
|
||||
};
|
||||
use ra_db::{impl_intern_key, salsa, CrateId};
|
||||
use syntax::ast;
|
||||
|
||||
use crate::builtin_type::BuiltinType;
|
||||
|
|
@ -57,8 +57,8 @@ mod tests;
|
|||
use std::sync::Arc;
|
||||
|
||||
use arena::Arena;
|
||||
use base_db::{CrateId, Edition, FileId};
|
||||
use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile};
|
||||
use ra_db::{CrateId, Edition, FileId};
|
||||
use rustc_hash::FxHashMap;
|
||||
use stdx::format_to;
|
||||
use syntax::ast;
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
//! `DefCollector::collect` contains the fixed-point iteration loop which
|
||||
//! resolves imports and expands macros.
|
||||
|
||||
use base_db::{CrateId, FileId, ProcMacroId};
|
||||
use cfg::CfgOptions;
|
||||
use hir_expand::{
|
||||
ast_id_map::FileAstId,
|
||||
|
|
@ -12,7 +13,6 @@ use hir_expand::{
|
|||
proc_macro::ProcMacroExpander,
|
||||
HirFileId, MacroCallId, MacroDefId, MacroDefKind,
|
||||
};
|
||||
use ra_db::{CrateId, FileId, ProcMacroId};
|
||||
use rustc_hash::FxHashMap;
|
||||
use syntax::ast;
|
||||
use test_utils::mark;
|
||||
|
|
@ -1209,7 +1209,7 @@ fn is_macro_rules(path: &ModPath) -> bool {
|
|||
mod tests {
|
||||
use crate::{db::DefDatabase, test_db::TestDB};
|
||||
use arena::Arena;
|
||||
use ra_db::{fixture::WithFixture, SourceDatabase};
|
||||
use base_db::{fixture::WithFixture, SourceDatabase};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
//! This module resolves `mod foo;` declaration to file.
|
||||
use base_db::FileId;
|
||||
use hir_expand::name::Name;
|
||||
use ra_db::FileId;
|
||||
use syntax::SmolStr;
|
||||
|
||||
use crate::{db::DefDatabase, HirFileId};
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
use std::iter::successors;
|
||||
|
||||
use base_db::Edition;
|
||||
use hir_expand::name::Name;
|
||||
use ra_db::Edition;
|
||||
use test_utils::mark;
|
||||
|
||||
use crate::{
|
||||
|
|
@ -6,8 +6,8 @@ mod primitives;
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
use base_db::{fixture::WithFixture, SourceDatabase};
|
||||
use expect::{expect, Expect};
|
||||
use ra_db::{fixture::WithFixture, SourceDatabase};
|
||||
use test_utils::mark;
|
||||
|
||||
use crate::{db::DefDatabase, nameres::*, test_db::TestDB};
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use ra_db::SourceDatabaseExt;
|
||||
use base_db::SourceDatabaseExt;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
@ -8,11 +8,11 @@ use std::{
|
|||
};
|
||||
|
||||
use crate::body::LowerCtx;
|
||||
use base_db::CrateId;
|
||||
use hir_expand::{
|
||||
hygiene::Hygiene,
|
||||
name::{AsName, Name},
|
||||
};
|
||||
use ra_db::CrateId;
|
||||
use syntax::ast;
|
||||
|
||||
use crate::{
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
//! Name resolution façade.
|
||||
use std::sync::Arc;
|
||||
|
||||
use base_db::CrateId;
|
||||
use hir_expand::{
|
||||
name::{name, Name},
|
||||
MacroDefId,
|
||||
};
|
||||
use ra_db::CrateId;
|
||||
use rustc_hash::FxHashSet;
|
||||
|
||||
use crate::{
|
||||
|
|
@ -5,15 +5,15 @@ use std::{
|
|||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
use base_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, Upcast};
|
||||
use hir_expand::db::AstDatabase;
|
||||
use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, Upcast};
|
||||
use rustc_hash::FxHashSet;
|
||||
|
||||
use crate::db::DefDatabase;
|
||||
|
||||
#[salsa::database(
|
||||
ra_db::SourceDatabaseExtStorage,
|
||||
ra_db::SourceDatabaseStorage,
|
||||
base_db::SourceDatabaseExtStorage,
|
||||
base_db::SourceDatabaseStorage,
|
||||
hir_expand::db::AstDatabaseStorage,
|
||||
crate::db::InternDatabaseStorage,
|
||||
crate::db::DefDatabaseStorage
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
[package]
|
||||
edition = "2018"
|
||||
name = "ra_hir_expand"
|
||||
version = "0.1.0"
|
||||
authors = ["rust-analyzer developers"]
|
||||
name = "hir_expand"
|
||||
version = "0.0.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
authors = ["rust-analyzer developers"]
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
|
@ -14,7 +14,7 @@ either = "1.5.3"
|
|||
rustc-hash = "1.0.0"
|
||||
|
||||
arena = { path = "../arena" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
base_db = { path = "../base_db" }
|
||||
syntax = { path = "../syntax" }
|
||||
parser = { path = "../parser" }
|
||||
profile = { path = "../profile" }
|
||||
|
|
@ -253,8 +253,8 @@ fn partial_ord_expand(
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use base_db::{fixture::WithFixture, CrateId, SourceDatabase};
|
||||
use name::{known, Name};
|
||||
use ra_db::{fixture::WithFixture, CrateId, SourceDatabase};
|
||||
|
||||
use crate::{test_db::TestDB, AstId, MacroCallId, MacroCallKind, MacroCallLoc};
|
||||
|
||||
|
|
@ -4,10 +4,10 @@ use crate::{
|
|||
MacroDefId, MacroDefKind, TextSize,
|
||||
};
|
||||
|
||||
use base_db::FileId;
|
||||
use either::Either;
|
||||
use mbe::parse_to_token_tree;
|
||||
use parser::FragmentKind;
|
||||
use ra_db::FileId;
|
||||
use syntax::ast::{self, AstToken, HasStringValue};
|
||||
|
||||
macro_rules! register_builtin {
|
||||
|
|
@ -426,7 +426,7 @@ mod tests {
|
|||
name::AsName, test_db::TestDB, AstNode, EagerCallLoc, MacroCallId, MacroCallKind,
|
||||
MacroCallLoc,
|
||||
};
|
||||
use ra_db::{fixture::WithFixture, SourceDatabase};
|
||||
use base_db::{fixture::WithFixture, SourceDatabase};
|
||||
use std::sync::Arc;
|
||||
use syntax::ast::NameOwner;
|
||||
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
use base_db::{salsa, SourceDatabase};
|
||||
use mbe::{ExpandResult, MacroRules};
|
||||
use parser::FragmentKind;
|
||||
use ra_db::{salsa, SourceDatabase};
|
||||
use syntax::{algo::diff, AstNode, GreenNode, Parse, SyntaxKind::*, SyntaxNode};
|
||||
|
||||
use crate::{
|
||||
|
|
@ -25,8 +25,8 @@ use crate::{
|
|||
EagerCallLoc, EagerMacroId, InFile, MacroCallId, MacroCallKind, MacroDefId, MacroDefKind,
|
||||
};
|
||||
|
||||
use base_db::CrateId;
|
||||
use parser::FragmentKind;
|
||||
use ra_db::CrateId;
|
||||
use std::sync::Arc;
|
||||
use syntax::{algo::SyntaxRewriter, SyntaxNode};
|
||||
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
//!
|
||||
//! Specifically, `ast` + `Hygiene` allows you to create a `Name`. Note that, at
|
||||
//! this moment, this is horribly incomplete and handles only `$crate`.
|
||||
use base_db::CrateId;
|
||||
use either::Either;
|
||||
use ra_db::CrateId;
|
||||
use syntax::ast;
|
||||
|
||||
use crate::{
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
//! `ra_hir_expand` deals with macro expansion.
|
||||
//! `hir_expand` deals with macro expansion.
|
||||
//!
|
||||
//! Specifically, it implements a concept of `MacroFile` -- a file whose syntax
|
||||
//! tree originates not from the text of some `FileId`, but from some macro
|
||||
|
|
@ -18,7 +18,7 @@ pub mod eager;
|
|||
use std::hash::Hash;
|
||||
use std::sync::Arc;
|
||||
|
||||
use ra_db::{impl_intern_key, salsa, CrateId, FileId};
|
||||
use base_db::{impl_intern_key, salsa, CrateId, FileId};
|
||||
use syntax::{
|
||||
algo,
|
||||
ast::{self, AstNode},
|
||||
|
|
@ -115,7 +115,7 @@ impl AsName for ast::FieldKind {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsName for ra_db::Dependency {
|
||||
impl AsName for base_db::Dependency {
|
||||
fn as_name(&self) -> Name {
|
||||
Name::new_text(SmolStr::new(&*self.name))
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
//! Proc Macro Expander stub
|
||||
|
||||
use crate::{db::AstDatabase, LazyMacroId};
|
||||
use ra_db::{CrateId, ProcMacroId};
|
||||
use base_db::{CrateId, ProcMacroId};
|
||||
use tt::buffer::{Cursor, TokenBuffer};
|
||||
|
||||
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
|
||||
|
|
@ -5,12 +5,12 @@ use std::{
|
|||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate};
|
||||
use base_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate};
|
||||
use rustc_hash::FxHashSet;
|
||||
|
||||
#[salsa::database(
|
||||
ra_db::SourceDatabaseExtStorage,
|
||||
ra_db::SourceDatabaseStorage,
|
||||
base_db::SourceDatabaseExtStorage,
|
||||
base_db::SourceDatabaseStorage,
|
||||
crate::db::AstDatabaseStorage
|
||||
)]
|
||||
#[derive(Default)]
|
||||
|
|
@ -18,7 +18,7 @@ anyhow = "1.0.26"
|
|||
|
||||
arena = { path = "../arena" }
|
||||
cfg = { path = "../cfg" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
base_db = { path = "../base_db" }
|
||||
toolchain = { path = "../toolchain" }
|
||||
proc_macro_api = { path = "../proc_macro_api" }
|
||||
paths = { path = "../paths" }
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ use std::{
|
|||
|
||||
use anyhow::{Context, Result};
|
||||
use arena::{Arena, Idx};
|
||||
use base_db::Edition;
|
||||
use cargo_metadata::{BuildScript, CargoOpt, Message, MetadataCommand, PackageId};
|
||||
use paths::{AbsPath, AbsPathBuf};
|
||||
use ra_db::Edition;
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
use crate::cfg_flag::CfgFlag;
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ use std::{
|
|||
};
|
||||
|
||||
use anyhow::{bail, Context, Result};
|
||||
use base_db::{CrateGraph, CrateId, CrateName, Edition, Env, FileId};
|
||||
use cfg::CfgOptions;
|
||||
use paths::{AbsPath, AbsPathBuf};
|
||||
use ra_db::{CrateGraph, CrateId, CrateName, Edition, Env, FileId};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
|
||||
use crate::cfg_flag::CfgFlag;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use base_db::{CrateId, CrateName, Dependency, Edition};
|
||||
use paths::{AbsPath, AbsPathBuf};
|
||||
use ra_db::{CrateId, CrateName, Dependency, Edition};
|
||||
use rustc_hash::FxHashMap;
|
||||
use serde::{de, Deserialize};
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ stdx = { path = "../stdx" }
|
|||
syntax = { path = "../syntax" }
|
||||
text_edit = { path = "../text_edit" }
|
||||
profile = { path = "../profile" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
base_db = { path = "../base_db" }
|
||||
ra_ide_db = { path = "../ra_ide_db" }
|
||||
hir = { path = "../ra_hir", package = "ra_hir" }
|
||||
test_utils = { path = "../test_utils" }
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
use std::mem;
|
||||
|
||||
use algo::find_covering_element;
|
||||
use base_db::{FileId, FileRange};
|
||||
use hir::Semantics;
|
||||
use ra_db::{FileId, FileRange};
|
||||
use ra_ide_db::{
|
||||
source_change::{SourceChange, SourceFileEdit},
|
||||
RootDatabase,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::FileId;
|
||||
use hir::{EnumVariant, Module, ModuleDef, Name};
|
||||
use ra_db::FileId;
|
||||
use ra_ide_db::{defs::Definition, search::Reference, RootDatabase};
|
||||
use rustc_hash::FxHashSet;
|
||||
use syntax::{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::FileId;
|
||||
use hir::{db::HirDatabase, HasSource, HasVisibility, PathResolution};
|
||||
use ra_db::FileId;
|
||||
use syntax::{ast, AstNode, TextRange, TextSize};
|
||||
|
||||
use crate::{utils::vis_offset, AssistContext, AssistId, AssistKind, Assists};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
use base_db::FileId;
|
||||
use hir::HirDisplay;
|
||||
use ra_db::FileId;
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use syntax::{
|
||||
ast::{
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ mod tests;
|
|||
pub mod utils;
|
||||
pub mod ast_transform;
|
||||
|
||||
use base_db::FileRange;
|
||||
use hir::Semantics;
|
||||
use ra_db::FileRange;
|
||||
use ra_ide_db::{source_change::SourceChange, RootDatabase};
|
||||
use syntax::TextRange;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
mod generated;
|
||||
|
||||
use base_db::{fixture::WithFixture, FileId, FileRange, SourceDatabaseExt};
|
||||
use hir::Semantics;
|
||||
use ra_db::{fixture::WithFixture, FileId, FileRange, SourceDatabaseExt};
|
||||
use ra_ide_db::RootDatabase;
|
||||
use syntax::TextRange;
|
||||
use test_utils::{assert_eq_text, extract_offset, extract_range};
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ itertools = "0.9.0"
|
|||
|
||||
stdx = { path = "../stdx" }
|
||||
syntax = { path = "../syntax" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
base_db = { path = "../base_db" }
|
||||
profile = { path = "../profile" }
|
||||
hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
|
||||
hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
|
||||
hir_expand = { path = "../hir_expand" }
|
||||
hir_def = { path = "../hir_def" }
|
||||
hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" }
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
use std::{iter, sync::Arc};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use base_db::{CrateId, Edition, FileId};
|
||||
use either::Either;
|
||||
use hir_def::{
|
||||
adt::ReprKind,
|
||||
|
|
@ -30,7 +31,6 @@ use hir_ty::{
|
|||
method_resolution, ApplicationTy, CallableDefId, Canonical, FnSig, GenericPredicate,
|
||||
InEnvironment, Substs, TraitEnvironment, Ty, TyDefId, TypeCtor,
|
||||
};
|
||||
use ra_db::{CrateId, Edition, FileId};
|
||||
use rustc_hash::FxHashSet;
|
||||
use stdx::impl_from;
|
||||
use syntax::{
|
||||
|
|
@ -815,7 +815,7 @@ pub struct MacroDef {
|
|||
impl MacroDef {
|
||||
/// FIXME: right now, this just returns the root module of the crate that
|
||||
/// defines this macro. The reasons for this is that macros are expanded
|
||||
/// early, in `ra_hir_expand`, where modules simply do not exist yet.
|
||||
/// early, in `hir_expand`, where modules simply do not exist yet.
|
||||
pub fn module(self, db: &dyn HirDatabase) -> Option<Module> {
|
||||
let krate = self.id.krate?;
|
||||
let module_id = db.crate_def_map(krate).root;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ macro_rules! from_id {
|
|||
}
|
||||
|
||||
from_id![
|
||||
(ra_db::CrateId, crate::Crate),
|
||||
(base_db::CrateId, crate::Crate),
|
||||
(hir_def::ModuleId, crate::Module),
|
||||
(hir_def::StructId, crate::Struct),
|
||||
(hir_def::UnionId, crate::Union),
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ mod source_to_def;
|
|||
|
||||
use std::{cell::RefCell, fmt, iter::successors};
|
||||
|
||||
use base_db::{FileId, FileRange};
|
||||
use hir_def::{
|
||||
resolver::{self, HasResolver, Resolver},
|
||||
AsMacroCall, FunctionId, TraitId, VariantId,
|
||||
|
|
@ -11,7 +12,6 @@ use hir_def::{
|
|||
use hir_expand::{hygiene::Hygiene, name::AsName, ExpansionInfo};
|
||||
use hir_ty::associated_type_shorthand_candidates;
|
||||
use itertools::Itertools;
|
||||
use ra_db::{FileId, FileRange};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use syntax::{
|
||||
algo::{find_node_at_offset, skip_trivia_token},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
//! Maps *syntax* of various definitions to their semantic ids.
|
||||
|
||||
use base_db::FileId;
|
||||
use hir_def::{
|
||||
child_by_source::ChildBySource,
|
||||
dyn_map::DynMap,
|
||||
|
|
@ -9,7 +10,6 @@ use hir_def::{
|
|||
ModuleId, StaticId, StructId, TraitId, TypeAliasId, TypeParamId, UnionId, VariantId,
|
||||
};
|
||||
use hir_expand::{name::AsName, AstId, MacroDefKind};
|
||||
use ra_db::FileId;
|
||||
use rustc_hash::FxHashMap;
|
||||
use stdx::impl_from;
|
||||
use syntax::{
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ use crate::{
|
|||
MacroDef, ModPath, ModuleDef, Path, PathKind, Static, Struct, Trait, Type, TypeAlias,
|
||||
TypeParam,
|
||||
};
|
||||
use ra_db::CrateId;
|
||||
use base_db::CrateId;
|
||||
|
||||
/// `SourceAnalyzer` is a convenience wrapper which exposes HIR API in terms of
|
||||
/// original source files. It should not be used inside the HIR itself.
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ rustc-hash = "1.1.0"
|
|||
|
||||
stdx = { path = "../stdx" }
|
||||
|
||||
hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
|
||||
hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
|
||||
hir_def = { path = "../hir_def" }
|
||||
hir_expand = { path = "../hir_expand" }
|
||||
arena = { path = "../arena" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
base_db = { path = "../base_db" }
|
||||
profile = { path = "../profile" }
|
||||
syntax = { path = "../syntax" }
|
||||
test_utils = { path = "../test_utils" }
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
use std::iter::successors;
|
||||
|
||||
use base_db::CrateId;
|
||||
use hir_def::lang_item::LangItemTarget;
|
||||
use hir_expand::name::name;
|
||||
use log::{info, warn};
|
||||
use ra_db::CrateId;
|
||||
|
||||
use crate::{
|
||||
db::HirDatabase,
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use arena::map::ArenaMap;
|
||||
use base_db::{impl_intern_key, salsa, CrateId, Upcast};
|
||||
use hir_def::{
|
||||
db::DefDatabase, expr::ExprId, DefWithBodyId, FunctionId, GenericDefId, ImplId, LocalFieldId,
|
||||
TypeParamId, VariantId,
|
||||
};
|
||||
use ra_db::{impl_intern_key, salsa, CrateId, Upcast};
|
||||
|
||||
use crate::{
|
||||
method_resolution::{InherentImpls, TraitImpls},
|
||||
|
|
|
|||
|
|
@ -208,12 +208,12 @@ impl Diagnostic for MismatchedArgCount {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use base_db::{fixture::WithFixture, FileId, SourceDatabase, SourceDatabaseExt};
|
||||
use hir_def::{db::DefDatabase, AssocItemId, ModuleDefId};
|
||||
use hir_expand::{
|
||||
db::AstDatabase,
|
||||
diagnostics::{Diagnostic, DiagnosticSinkBuilder},
|
||||
};
|
||||
use ra_db::{fixture::WithFixture, FileId, SourceDatabase, SourceDatabaseExt};
|
||||
use rustc_hash::FxHashMap;
|
||||
use syntax::{TextRange, TextSize};
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ mod test_db;
|
|||
|
||||
use std::{iter, mem, ops::Deref, sync::Arc};
|
||||
|
||||
use base_db::{salsa, CrateId};
|
||||
use hir_def::{
|
||||
expr::ExprId,
|
||||
type_ref::{Mutability, Rawness},
|
||||
|
|
@ -33,7 +34,6 @@ use hir_def::{
|
|||
TypeParamId,
|
||||
};
|
||||
use itertools::Itertools;
|
||||
use ra_db::{salsa, CrateId};
|
||||
|
||||
use crate::{
|
||||
db::HirDatabase,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
use std::{iter, sync::Arc};
|
||||
|
||||
use arena::map::ArenaMap;
|
||||
use base_db::CrateId;
|
||||
use hir_def::{
|
||||
adt::StructKind,
|
||||
builtin_type::BuiltinType,
|
||||
|
|
@ -20,7 +21,6 @@ use hir_def::{
|
|||
UnionId, VariantId,
|
||||
};
|
||||
use hir_expand::name::Name;
|
||||
use ra_db::CrateId;
|
||||
use smallvec::SmallVec;
|
||||
use stdx::impl_from;
|
||||
use test_utils::mark;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
use std::{iter, sync::Arc};
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use base_db::CrateId;
|
||||
use hir_def::{
|
||||
builtin_type::{IntBitness, Signedness},
|
||||
lang_item::LangItemTarget,
|
||||
|
|
@ -12,7 +13,6 @@ use hir_def::{
|
|||
AssocContainerId, AssocItemId, FunctionId, HasModule, ImplId, Lookup, TraitId,
|
||||
};
|
||||
use hir_expand::name::Name;
|
||||
use ra_db::CrateId;
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
|
||||
use super::Substs;
|
||||
|
|
|
|||
|
|
@ -5,16 +5,16 @@ use std::{
|
|||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
use base_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast};
|
||||
use hir_def::{db::DefDatabase, ModuleId};
|
||||
use hir_expand::db::AstDatabase;
|
||||
use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use syntax::TextRange;
|
||||
use test_utils::extract_annotations;
|
||||
|
||||
#[salsa::database(
|
||||
ra_db::SourceDatabaseExtStorage,
|
||||
ra_db::SourceDatabaseStorage,
|
||||
base_db::SourceDatabaseExtStorage,
|
||||
base_db::SourceDatabaseStorage,
|
||||
hir_expand::db::AstDatabaseStorage,
|
||||
hir_def::db::InternDatabaseStorage,
|
||||
hir_def::db::DefDatabaseStorage,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ mod display_source_code;
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
use base_db::{fixture::WithFixture, FileRange, SourceDatabase, SourceDatabaseExt};
|
||||
use expect::Expect;
|
||||
use hir_def::{
|
||||
body::{BodySourceMap, SyntheticSyntax},
|
||||
|
|
@ -21,7 +22,6 @@ use hir_def::{
|
|||
AssocItemId, DefWithBodyId, LocalModuleId, Lookup, ModuleDefId,
|
||||
};
|
||||
use hir_expand::{db::AstDatabase, InFile};
|
||||
use ra_db::{fixture::WithFixture, FileRange, SourceDatabase, SourceDatabaseExt};
|
||||
use stdx::format_to;
|
||||
use syntax::{
|
||||
algo,
|
||||
|
|
|
|||
|
|
@ -1776,8 +1776,8 @@ fn main() {
|
|||
);
|
||||
}
|
||||
|
||||
// This test is actually testing the shadowing behavior within ra_hir_def. It
|
||||
// lives here because the testing infrastructure in ra_hir_def isn't currently
|
||||
// This test is actually testing the shadowing behavior within hir_def. It
|
||||
// lives here because the testing infrastructure in hir_def isn't currently
|
||||
// capable of asserting the necessary conditions.
|
||||
#[test]
|
||||
fn should_be_shadowing_imports() {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
//! Trait solving using Chalk.
|
||||
use std::sync::Arc;
|
||||
|
||||
use base_db::CrateId;
|
||||
use chalk_ir::cast::Cast;
|
||||
use chalk_solve::Solver;
|
||||
use hir_def::{lang_item::LangItemTarget, TraitId};
|
||||
use ra_db::CrateId;
|
||||
|
||||
use crate::{db::HirDatabase, DebruijnIndex, Substs};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ use log::debug;
|
|||
use chalk_ir::{fold::shift::Shift, CanonicalVarKinds, GenericArg, TypeName};
|
||||
use chalk_solve::rust_ir::{self, OpaqueTyDatumBound, WellKnownTrait};
|
||||
|
||||
use base_db::{salsa::InternKey, CrateId};
|
||||
use hir_def::{
|
||||
lang_item::{lang_attr, LangItemTarget},
|
||||
AssocContainerId, AssocItemId, HasModule, Lookup, TypeAliasId,
|
||||
};
|
||||
use ra_db::{salsa::InternKey, CrateId};
|
||||
|
||||
use super::ChalkContext;
|
||||
use crate::{
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
//! representation of the various objects Chalk deals with (types, goals etc.).
|
||||
|
||||
use super::tls;
|
||||
use base_db::salsa::InternId;
|
||||
use chalk_ir::{GenericArg, Goal, GoalData};
|
||||
use hir_def::TypeAliasId;
|
||||
use ra_db::salsa::InternId;
|
||||
use std::{fmt, sync::Arc};
|
||||
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ use chalk_ir::{
|
|||
};
|
||||
use chalk_solve::rust_ir;
|
||||
|
||||
use base_db::salsa::InternKey;
|
||||
use hir_def::{type_ref::Mutability, AssocContainerId, GenericDefId, Lookup, TypeAliasId};
|
||||
use ra_db::salsa::InternKey;
|
||||
|
||||
use crate::{
|
||||
db::HirDatabase,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ stdx = { path = "../stdx" }
|
|||
|
||||
syntax = { path = "../syntax" }
|
||||
text_edit = { path = "../text_edit" }
|
||||
ra_db = { path = "../ra_db" }
|
||||
base_db = { path = "../base_db" }
|
||||
ra_ide_db = { path = "../ra_ide_db" }
|
||||
cfg = { path = "../cfg" }
|
||||
profile = { path = "../profile" }
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ impl CallLocations {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ra_db::FilePosition;
|
||||
use base_db::FilePosition;
|
||||
|
||||
use crate::mock_analysis::analysis_and_position;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//! FIXME: write short doc here
|
||||
|
||||
use base_db::SourceDatabase;
|
||||
use hir::{Semantics, SemanticsScope, Type};
|
||||
use ra_db::SourceDatabase;
|
||||
use ra_ide_db::RootDatabase;
|
||||
use syntax::{
|
||||
algo::{find_covering_element, find_node_at_offset},
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
use std::cell::RefCell;
|
||||
|
||||
use base_db::SourceDatabase;
|
||||
use hir::{diagnostics::DiagnosticSinkBuilder, Semantics};
|
||||
use itertools::Itertools;
|
||||
use ra_db::SourceDatabase;
|
||||
use ra_ide_db::RootDatabase;
|
||||
use syntax::{
|
||||
ast::{self, AstNode},
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
//! The same module also has all curret custom fixes for the diagnostics implemented.
|
||||
use crate::Fix;
|
||||
use ast::{edit::IndentLevel, make};
|
||||
use base_db::FileId;
|
||||
use hir::{
|
||||
db::AstDatabase,
|
||||
diagnostics::{Diagnostic, MissingFields, MissingOkInTailExpr, NoSuchField, UnresolvedModule},
|
||||
HasSource, HirDisplay, Semantics, VariantDef,
|
||||
};
|
||||
use ra_db::FileId;
|
||||
use ra_ide_db::{
|
||||
source_change::{FileSystemEdit, SourceFileEdit},
|
||||
RootDatabase,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
//! FIXME: write short doc here
|
||||
|
||||
use base_db::{FileId, SourceDatabase};
|
||||
use either::Either;
|
||||
use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource};
|
||||
use ra_db::{FileId, SourceDatabase};
|
||||
use ra_ide_db::{defs::Definition, RootDatabase};
|
||||
use syntax::{
|
||||
ast::{self, DocCommentsOwner, NameOwner},
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue