Rename ra_db -> base_db

This commit is contained in:
Aleksey Kladov 2020-08-13 16:25:38 +02:00
parent 902f74c269
commit ed20a857f4
111 changed files with 183 additions and 183 deletions

50
Cargo.lock generated
View File

@ -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"
@ -956,12 +971,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 +997,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,31 +1010,16 @@ 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",
"itertools",
"log",
"profile",
"ra_db",
"ra_hir_def",
"ra_hir_expand",
"ra_hir_ty",
@ -1034,6 +1034,7 @@ version = "0.1.0"
dependencies = [
"anymap",
"arena",
"base_db",
"cfg",
"drop_bomb",
"either",
@ -1045,7 +1046,6 @@ dependencies = [
"mbe",
"once_cell",
"profile",
"ra_db",
"ra_hir_expand",
"rustc-hash",
"smallvec",
@ -1060,12 +1060,12 @@ name = "ra_hir_expand"
version = "0.1.0"
dependencies = [
"arena",
"base_db",
"either",
"log",
"mbe",
"parser",
"profile",
"ra_db",
"rustc-hash",
"syntax",
"test_utils",
@ -1078,6 +1078,7 @@ version = "0.1.0"
dependencies = [
"arena",
"arrayvec",
"base_db",
"chalk-ir",
"chalk-recursive",
"chalk-solve",
@ -1086,7 +1087,6 @@ dependencies = [
"itertools",
"log",
"profile",
"ra_db",
"ra_hir_def",
"ra_hir_expand",
"rustc-hash",
@ -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,6 +1230,7 @@ name = "rust-analyzer"
version = "0.1.0"
dependencies = [
"anyhow",
"base_db",
"cfg",
"crossbeam-channel",
"env_logger",
@ -1248,7 +1249,6 @@ dependencies = [
"proc_macro_srv",
"profile",
"project_model",
"ra_db",
"ra_hir",
"ra_hir_def",
"ra_hir_ty",

View File

@ -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

View File

@ -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;

View File

@ -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" }

View File

@ -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;

View File

@ -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;

View File

@ -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};

View File

@ -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" }

View File

@ -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,

View File

@ -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::{

View File

@ -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};

View File

@ -1,5 +1,5 @@
use base_db::FileId;
use hir::HirDisplay;
use ra_db::FileId;
use rustc_hash::{FxHashMap, FxHashSet};
use syntax::{
ast::{

View File

@ -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;

View File

@ -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};

View File

@ -18,7 +18,7 @@ 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" }

View File

@ -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::{

View File

@ -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),

View File

@ -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},

View File

@ -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::{

View File

@ -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.

View File

@ -23,7 +23,7 @@ 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" }

View File

@ -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;

View File

@ -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};

View File

@ -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::{

View File

@ -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;

View File

@ -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::{

View File

@ -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};

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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::*;

View File

@ -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};

View File

@ -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::{

View File

@ -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};

View File

@ -1,6 +1,6 @@
use std::sync::Arc;
use ra_db::SourceDatabaseExt;
use base_db::SourceDatabaseExt;
use super::*;

View File

@ -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::{

View File

@ -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::{

View File

@ -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

View File

@ -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" }

View File

@ -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};

View File

@ -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;

View File

@ -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::{

View File

@ -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};

View File

@ -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::{

View File

@ -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},

View File

@ -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))
}

View File

@ -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)]

View File

@ -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)]

View File

@ -21,7 +21,7 @@ stdx = { path = "../stdx" }
hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
hir_expand = { path = "../ra_hir_expand", package = "ra_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" }

View File

@ -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,

View File

@ -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},

View File

@ -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};

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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,

View File

@ -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};

View File

@ -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::{

View File

@ -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)]

View File

@ -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,

View File

@ -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" }

View File

@ -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;

View File

@ -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},

View File

@ -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},

View File

@ -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,

View File

@ -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},

View File

@ -100,7 +100,7 @@ pub(crate) fn reference_definition(
#[cfg(test)]
mod tests {
use ra_db::FileRange;
use base_db::FileRange;
use syntax::{TextRange, TextSize};
use crate::mock_analysis::MockAnalysis;

View File

@ -74,7 +74,7 @@ fn impls_for_trait(
#[cfg(test)]
mod tests {
use ra_db::FileRange;
use base_db::FileRange;
use crate::mock_analysis::MockAnalysis;

View File

@ -54,7 +54,7 @@ fn pick_best(tokens: TokenAtOffset<SyntaxToken>) -> Option<SyntaxToken> {
#[cfg(test)]
mod tests {
use ra_db::FileRange;
use base_db::FileRange;
use crate::mock_analysis::MockAnalysis;

View File

@ -1,9 +1,9 @@
use base_db::SourceDatabase;
use hir::{
Adt, AsAssocItem, AssocItemContainer, Documentation, FieldSource, HasSource, HirDisplay,
Module, ModuleDef, ModuleSource, Semantics,
};
use itertools::Itertools;
use ra_db::SourceDatabase;
use ra_ide_db::{
defs::{classify_name, classify_name_ref, Definition},
RootDatabase,
@ -352,8 +352,8 @@ fn pick_best(tokens: TokenAtOffset<SyntaxToken>) -> Option<SyntaxToken> {
#[cfg(test)]
mod tests {
use base_db::FileLoader;
use expect::{expect, Expect};
use ra_db::FileLoader;
use crate::mock_analysis::analysis_and_position;

View File

@ -47,11 +47,11 @@ mod typing;
use std::sync::Arc;
use cfg::CfgOptions;
use ra_db::{
use base_db::{
salsa::{self, ParallelDatabase},
CheckCanceled, Env, FileLoader, FileSet, SourceDatabase, VfsPath,
};
use cfg::CfgOptions;
use ra_ide_db::{
symbol_index::{self, FileSymbol},
LineIndexDatabase,
@ -81,12 +81,12 @@ pub use crate::{
},
};
pub use hir::{Documentation, Semantics};
pub use ra_assists::{Assist, AssistConfig, AssistId, AssistKind, ResolvedAssist};
pub use ra_db::{
pub use base_db::{
Canceled, CrateGraph, CrateId, Edition, FileId, FilePosition, FileRange, SourceRoot,
SourceRootId,
};
pub use hir::{Documentation, Semantics};
pub use ra_assists::{Assist, AssistConfig, AssistId, AssistKind, ResolvedAssist};
pub use ra_ide_db::{
change::AnalysisChange,
line_index::{LineCol, LineIndex},

View File

@ -1,8 +1,8 @@
//! FIXME: write short doc here
use std::sync::Arc;
use base_db::{CrateName, FileSet, SourceRoot, VfsPath};
use cfg::CfgOptions;
use ra_db::{CrateName, FileSet, SourceRoot, VfsPath};
use test_utils::{
extract_annotations, extract_range_or_offset, Fixture, RangeOrOffset, CURSOR_MARKER,
};

View File

@ -1,5 +1,5 @@
use base_db::{CrateId, FileId, FilePosition};
use hir::Semantics;
use ra_db::{CrateId, FileId, FilePosition};
use ra_ide_db::RootDatabase;
use syntax::{
algo::find_node_at_offset,
@ -63,8 +63,8 @@ pub(crate) fn crate_for(db: &RootDatabase, file_id: FileId) -> Vec<CrateId> {
#[cfg(test)]
mod tests {
use base_db::Env;
use cfg::CfgOptions;
use ra_db::Env;
use test_utils::mark;
use crate::{

View File

@ -1,7 +1,7 @@
//! FIXME: write short doc here
use base_db::SourceDatabaseExt;
use hir::{Module, ModuleDef, ModuleSource, Semantics};
use ra_db::SourceDatabaseExt;
use ra_ide_db::{
defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass},
RootDatabase,

View File

@ -1,4 +1,4 @@
use ra_db::{FilePosition, FileRange};
use base_db::{FilePosition, FileRange};
use ra_ide_db::RootDatabase;
use crate::SourceFileEdit;

View File

@ -1,11 +1,11 @@
use std::{fmt, iter::FromIterator, sync::Arc};
use hir::MacroFile;
use profile::{memory_usage, Bytes};
use ra_db::{
use base_db::{
salsa::debug::{DebugQueryTable, TableEntry},
FileTextQuery, SourceRootId,
};
use hir::MacroFile;
use profile::{memory_usage, Bytes};
use ra_ide_db::{
symbol_index::{LibrarySymbolsQuery, SymbolIndex},
RootDatabase,
@ -16,7 +16,7 @@ use syntax::{ast, Parse, SyntaxNode};
use crate::FileId;
fn syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats {
ra_db::ParseQuery.in_db(db).entries::<SyntaxTreeStats>()
base_db::ParseQuery.in_db(db).entries::<SyntaxTreeStats>()
}
fn macro_syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats {
hir::db::ParseMacroQuery.in_db(db).entries::<SyntaxTreeStats>()

View File

@ -1,7 +1,7 @@
//! Renders a bit of code as HTML.
use base_db::SourceDatabase;
use oorandom::Rand32;
use ra_db::SourceDatabase;
use syntax::{AstNode, TextRange, TextSize};
use crate::{syntax_highlighting::highlight, FileId, RootDatabase};

View File

@ -1,4 +1,4 @@
use ra_db::{FileId, SourceDatabase};
use base_db::{FileId, SourceDatabase};
use ra_ide_db::RootDatabase;
use syntax::{
algo, AstNode, NodeOrToken, SourceFile,

View File

@ -15,7 +15,7 @@
mod on_enter;
use ra_db::{FilePosition, SourceDatabase};
use base_db::{FilePosition, SourceDatabase};
use ra_ide_db::{source_change::SourceFileEdit, RootDatabase};
use syntax::{
algo::find_node_at_offset,

View File

@ -1,7 +1,7 @@
//! Handles the `Enter` key press. At the momently, this only continues
//! comments, but should handle indent some time in the future as well.
use ra_db::{FilePosition, SourceDatabase};
use base_db::{FilePosition, SourceDatabase};
use ra_ide_db::RootDatabase;
use syntax::{
ast::{self, AstToken},

View File

@ -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" }
profile = { path = "../profile" }
test_utils = { path = "../test_utils" }

View File

@ -3,11 +3,11 @@
use std::{fmt, sync::Arc, time};
use profile::{memory_usage, Bytes};
use ra_db::{
use base_db::{
salsa::{Database, Durability, SweepStrategy},
CrateGraph, FileId, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId,
};
use profile::{memory_usage, Bytes};
use rustc_hash::FxHashSet;
use crate::{symbol_index::SymbolsDatabase, RootDatabase};
@ -146,7 +146,7 @@ impl RootDatabase {
let sweep = SweepStrategy::default().discard_values().sweep_all_revisions();
ra_db::ParseQuery.in_db(self).sweep(sweep);
base_db::ParseQuery.in_db(self).sweep(sweep);
hir::db::ParseMacroQuery.in_db(self).sweep(sweep);
// Macros do take significant space, but less then the syntax trees
@ -201,14 +201,14 @@ impl RootDatabase {
}
sweep_each_query![
// SourceDatabase
ra_db::ParseQuery
ra_db::CrateGraphQuery
base_db::ParseQuery
base_db::CrateGraphQuery
// SourceDatabaseExt
ra_db::FileTextQuery
ra_db::FileSourceRootQuery
ra_db::SourceRootQuery
ra_db::SourceRootCratesQuery
base_db::FileTextQuery
base_db::FileSourceRootQuery
base_db::SourceRootQuery
base_db::SourceRootCratesQuery
// AstDatabase
hir::db::AstIdMapQuery

View File

@ -13,19 +13,19 @@ mod wasm_shims;
use std::{fmt, sync::Arc};
use hir::db::{AstDatabase, DefDatabase, HirDatabase};
use ra_db::{
use base_db::{
salsa::{self, Durability},
Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase,
Upcast,
};
use hir::db::{AstDatabase, DefDatabase, HirDatabase};
use rustc_hash::FxHashSet;
use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase};
#[salsa::database(
ra_db::SourceDatabaseStorage,
ra_db::SourceDatabaseExtStorage,
base_db::SourceDatabaseStorage,
base_db::SourceDatabaseExtStorage,
LineIndexDatabaseStorage,
symbol_index::SymbolsDatabaseStorage,
hir::db::InternDatabaseStorage,
@ -111,8 +111,8 @@ impl RootDatabase {
}
pub fn update_lru_capacity(&mut self, lru_capacity: Option<usize>) {
let lru_capacity = lru_capacity.unwrap_or(ra_db::DEFAULT_LRU_CAP);
ra_db::ParseQuery.in_db_mut(self).set_lru_capacity(lru_capacity);
let lru_capacity = lru_capacity.unwrap_or(base_db::DEFAULT_LRU_CAP);
base_db::ParseQuery.in_db_mut(self).set_lru_capacity(lru_capacity);
hir::db::ParseMacroQuery.in_db_mut(self).set_lru_capacity(lru_capacity);
hir::db::MacroExpandQuery.in_db_mut(self).set_lru_capacity(lru_capacity);
}
@ -129,7 +129,7 @@ impl salsa::ParallelDatabase for RootDatabase {
}
#[salsa::query_group(LineIndexDatabaseStorage)]
pub trait LineIndexDatabase: ra_db::SourceDatabase + CheckCanceled {
pub trait LineIndexDatabase: base_db::SourceDatabase + CheckCanceled {
fn line_index(&self, file_id: FileId) -> Arc<LineIndex>;
}

View File

@ -6,9 +6,9 @@
use std::{convert::TryInto, mem};
use base_db::{FileId, FileRange, SourceDatabaseExt};
use hir::{DefWithBody, HasSource, Module, ModuleSource, Semantics, Visibility};
use once_cell::unsync::Lazy;
use ra_db::{FileId, FileRange, SourceDatabaseExt};
use rustc_hash::FxHashMap;
use syntax::{ast, match_ast, AstNode, TextRange, TextSize};

View File

@ -3,7 +3,7 @@
//!
//! It can be viewed as a dual for `AnalysisChange`.
use ra_db::FileId;
use base_db::FileId;
use text_edit::TextEdit;
#[derive(Default, Debug, Clone)]

View File

@ -28,12 +28,12 @@ use std::{
sync::Arc,
};
use fst::{self, Streamer};
use hir::db::DefDatabase;
use ra_db::{
use base_db::{
salsa::{self, ParallelDatabase},
CrateId, FileId, SourceDatabaseExt, SourceRootId,
};
use fst::{self, Streamer};
use hir::db::DefDatabase;
use rayon::prelude::*;
use rustc_hash::{FxHashMap, FxHashSet};
use syntax::{

View File

@ -13,7 +13,7 @@ doctest = false
[dependencies]
text_edit = { path = "../text_edit" }
syntax = { path = "../syntax" }
ra_db = { path = "../ra_db" }
base_db = { path = "../base_db" }
ra_ide_db = { path = "../ra_ide_db" }
hir = { path = "../ra_hir", package = "ra_hir" }
rustc-hash = "1.1.0"

View File

@ -18,8 +18,8 @@ use crate::errors::bail;
pub use crate::errors::SsrError;
pub use crate::matching::Match;
use crate::matching::MatchFailureReason;
use base_db::{FileId, FilePosition, FileRange};
use hir::Semantics;
use ra_db::{FileId, FilePosition, FileRange};
use ra_ide_db::source_change::SourceFileEdit;
use resolving::ResolvedRule;
use rustc_hash::FxHashMap;
@ -71,7 +71,7 @@ impl<'db> MatchFinder<'db> {
/// Constructs an instance using the start of the first file in `db` as the lookup context.
pub fn at_first_file(db: &'db ra_ide_db::RootDatabase) -> Result<MatchFinder<'db>, SsrError> {
use ra_db::SourceDatabaseExt;
use base_db::SourceDatabaseExt;
use ra_ide_db::symbol_index::SymbolsDatabase;
if let Some(first_file_id) = db
.local_roots()
@ -105,7 +105,7 @@ impl<'db> MatchFinder<'db> {
/// Finds matches for all added rules and returns edits for all found matches.
pub fn edits(&self) -> Vec<SourceFileEdit> {
use ra_db::SourceDatabaseExt;
use base_db::SourceDatabaseExt;
let mut matches_by_file = FxHashMap::default();
for m in self.matches().matches {
matches_by_file
@ -150,7 +150,7 @@ impl<'db> MatchFinder<'db> {
/// them, while recording reasons why they don't match. This API is useful for command
/// line-based debugging where providing a range is difficult.
pub fn debug_where_text_equal(&self, file_id: FileId, snippet: &str) -> Vec<MatchDebugInfo> {
use ra_db::SourceDatabaseExt;
use base_db::SourceDatabaseExt;
let file = self.sema.parse(file_id);
let mut res = Vec::new();
let file_text = self.sema.db.file_text(file_id);

View File

@ -6,8 +6,8 @@ use crate::{
resolving::{ResolvedPattern, ResolvedRule, UfcsCallInfo},
SsrMatches,
};
use base_db::FileRange;
use hir::Semantics;
use ra_db::FileRange;
use rustc_hash::FxHashMap;
use std::{cell::Cell, iter::Peekable};
use syntax::ast::{AstNode, AstToken};

View File

@ -2,8 +2,8 @@
use crate::errors::error;
use crate::{parsing, SsrError};
use base_db::FilePosition;
use parsing::Placeholder;
use ra_db::FilePosition;
use rustc_hash::FxHashMap;
use syntax::{ast, SmolStr, SyntaxKind, SyntaxNode, SyntaxToken};
use test_utils::mark;

View File

@ -5,7 +5,7 @@ use crate::{
resolving::{ResolvedPath, ResolvedPattern, ResolvedRule},
Match, MatchFinder,
};
use ra_db::{FileId, FileRange};
use base_db::{FileId, FileRange};
use ra_ide_db::{
defs::Definition,
search::{Reference, SearchScope},
@ -145,7 +145,7 @@ impl<'db> MatchFinder<'db> {
fn search_files_do(&self, mut callback: impl FnMut(FileId)) {
if self.restrict_ranges.is_empty() {
// Unrestricted search.
use ra_db::SourceDatabaseExt;
use base_db::SourceDatabaseExt;
use ra_ide_db::symbol_index::SymbolsDatabase;
for &root in self.sema.db.local_roots().iter() {
let sr = self.sema.db.source_root(root);

View File

@ -1,6 +1,6 @@
use crate::{MatchFinder, SsrRule};
use base_db::{salsa::Durability, FileId, FilePosition, FileRange, SourceDatabaseExt};
use expect::{expect, Expect};
use ra_db::{salsa::Durability, FileId, FilePosition, FileRange, SourceDatabaseExt};
use rustc_hash::FxHashSet;
use std::sync::Arc;
use test_utils::{mark, RangeOrOffset};
@ -62,7 +62,7 @@ fn parser_undefined_placeholder_in_replacement() {
/// `code` may optionally contain a cursor marker `<|>`. If it doesn't, then the position will be
/// the start of the file. If there's a second cursor marker, then we'll return a single range.
pub(crate) fn single_file(code: &str) -> (ra_ide_db::RootDatabase, FilePosition, Vec<FileRange>) {
use ra_db::fixture::WithFixture;
use base_db::fixture::WithFixture;
use ra_ide_db::symbol_index::SymbolsDatabase;
let (mut db, file_id, range_or_offset) = if code.contains(test_utils::CURSOR_MARKER) {
ra_ide_db::RootDatabase::with_range_or_offset(code)
@ -83,7 +83,7 @@ pub(crate) fn single_file(code: &str) -> (ra_ide_db::RootDatabase, FilePosition,
}
}
let mut local_roots = FxHashSet::default();
local_roots.insert(ra_db::fixture::WORKSPACE);
local_roots.insert(base_db::fixture::WORKSPACE);
db.set_local_roots_with_durability(Arc::new(local_roots), Durability::HIGH);
(db, position, selections)
}

View File

@ -46,7 +46,7 @@ cfg = { path = "../cfg" }
toolchain = { path = "../toolchain" }
# This should only be used in CLI
ra_db = { path = "../ra_db" }
base_db = { path = "../base_db" }
ra_ide_db = { path = "../ra_ide_db" }
ra_ssr = { path = "../ra_ssr" }
hir = { path = "../ra_hir", package = "ra_hir" }

View File

@ -3,7 +3,7 @@
use std::{env, path::PathBuf, str::FromStr, sync::Arc, time::Instant};
use anyhow::{bail, format_err, Result};
use ra_db::{
use base_db::{
salsa::{Database, Durability},
FileId,
};

View File

@ -6,6 +6,10 @@ use std::{
time::{SystemTime, UNIX_EPOCH},
};
use base_db::{
salsa::{self, ParallelDatabase},
SourceDatabaseExt,
};
use hir::{
db::{AstDatabase, DefDatabase, HirDatabase},
original_range, AssocItem, Crate, HasSource, HirDisplay, ModuleDef,
@ -14,10 +18,6 @@ use hir_def::FunctionId;
use hir_ty::{Ty, TypeWalk};
use itertools::Itertools;
use oorandom::Rand32;
use ra_db::{
salsa::{self, ParallelDatabase},
SourceDatabaseExt,
};
use rayon::prelude::*;
use rustc_hash::FxHashSet;
use stdx::format_to;

Some files were not shown because too many files have changed in this diff Show More