mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 05:08:52 +00:00
Rename ra_arena
This commit is contained in:
parent
6be5ab0200
commit
98baa9b569
30 changed files with 40 additions and 40 deletions
18
Cargo.lock
generated
18
Cargo.lock
generated
|
@ -45,6 +45,10 @@ version = "0.12.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344"
|
checksum = "33954243bd79057c2de7338850b85983a44588021f8a5fee574a8888c6de4344"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "arena"
|
||||||
|
version = "0.0.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arrayvec"
|
name = "arrayvec"
|
||||||
version = "0.5.1"
|
version = "0.5.1"
|
||||||
|
@ -899,10 +903,6 @@ dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "ra_arena"
|
|
||||||
version = "0.1.0"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ra_assists"
|
name = "ra_assists"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
@ -977,6 +977,7 @@ name = "ra_hir_def"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anymap",
|
"anymap",
|
||||||
|
"arena",
|
||||||
"drop_bomb",
|
"drop_bomb",
|
||||||
"either",
|
"either",
|
||||||
"expect",
|
"expect",
|
||||||
|
@ -985,7 +986,6 @@ dependencies = [
|
||||||
"itertools",
|
"itertools",
|
||||||
"log",
|
"log",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"ra_arena",
|
|
||||||
"ra_cfg",
|
"ra_cfg",
|
||||||
"ra_db",
|
"ra_db",
|
||||||
"ra_hir_expand",
|
"ra_hir_expand",
|
||||||
|
@ -1003,9 +1003,9 @@ dependencies = [
|
||||||
name = "ra_hir_expand"
|
name = "ra_hir_expand"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"arena",
|
||||||
"either",
|
"either",
|
||||||
"log",
|
"log",
|
||||||
"ra_arena",
|
|
||||||
"ra_db",
|
"ra_db",
|
||||||
"ra_mbe",
|
"ra_mbe",
|
||||||
"ra_parser",
|
"ra_parser",
|
||||||
|
@ -1020,6 +1020,7 @@ dependencies = [
|
||||||
name = "ra_hir_ty"
|
name = "ra_hir_ty"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"arena",
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"chalk-ir",
|
"chalk-ir",
|
||||||
"chalk-recursive",
|
"chalk-recursive",
|
||||||
|
@ -1028,7 +1029,6 @@ dependencies = [
|
||||||
"expect",
|
"expect",
|
||||||
"itertools",
|
"itertools",
|
||||||
"log",
|
"log",
|
||||||
"ra_arena",
|
|
||||||
"ra_db",
|
"ra_db",
|
||||||
"ra_hir_def",
|
"ra_hir_def",
|
||||||
"ra_hir_expand",
|
"ra_hir_expand",
|
||||||
|
@ -1141,12 +1141,12 @@ dependencies = [
|
||||||
name = "ra_prof"
|
name = "ra_prof"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"arena",
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"libc",
|
"libc",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"perf-event",
|
"perf-event",
|
||||||
"ra_arena",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1154,10 +1154,10 @@ name = "ra_project_model"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
"arena",
|
||||||
"cargo_metadata",
|
"cargo_metadata",
|
||||||
"log",
|
"log",
|
||||||
"paths",
|
"paths",
|
||||||
"ra_arena",
|
|
||||||
"ra_cfg",
|
"ra_cfg",
|
||||||
"ra_db",
|
"ra_db",
|
||||||
"ra_proc_macro",
|
"ra_proc_macro",
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
[package]
|
[package]
|
||||||
edition = "2018"
|
name = "arena"
|
||||||
name = "ra_arena"
|
version = "0.0.0"
|
||||||
version = "0.1.0"
|
|
||||||
authors = ["rust-analyzer developers"]
|
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
authors = ["rust-analyzer developers"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
doctest = false
|
doctest = false
|
|
@ -22,7 +22,7 @@ smallvec = "1.4.0"
|
||||||
|
|
||||||
stdx = { path = "../stdx" }
|
stdx = { path = "../stdx" }
|
||||||
|
|
||||||
ra_arena = { path = "../ra_arena" }
|
arena = { path = "../arena" }
|
||||||
ra_db = { path = "../ra_db" }
|
ra_db = { path = "../ra_db" }
|
||||||
ra_syntax = { path = "../ra_syntax" }
|
ra_syntax = { path = "../ra_syntax" }
|
||||||
ra_prof = { path = "../ra_prof" }
|
ra_prof = { path = "../ra_prof" }
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use arena::{map::ArenaMap, Arena};
|
||||||
use either::Either;
|
use either::Either;
|
||||||
use hir_expand::{
|
use hir_expand::{
|
||||||
name::{AsName, Name},
|
name::{AsName, Name},
|
||||||
InFile,
|
InFile,
|
||||||
};
|
};
|
||||||
use ra_arena::{map::ArenaMap, Arena};
|
|
||||||
use ra_syntax::ast::{self, NameOwner, VisibilityOwner};
|
use ra_syntax::ast::{self, NameOwner, VisibilityOwner};
|
||||||
use tt::{Delimiter, DelimiterKind, Leaf, Subtree, TokenTree};
|
use tt::{Delimiter, DelimiterKind, Leaf, Subtree, TokenTree};
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ pub mod scope;
|
||||||
|
|
||||||
use std::{mem, ops::Index, sync::Arc};
|
use std::{mem, ops::Index, sync::Arc};
|
||||||
|
|
||||||
|
use arena::{map::ArenaMap, Arena};
|
||||||
use drop_bomb::DropBomb;
|
use drop_bomb::DropBomb;
|
||||||
use either::Either;
|
use either::Either;
|
||||||
use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId};
|
use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, AstId, HirFileId, InFile, MacroDefId};
|
||||||
use ra_arena::{map::ArenaMap, Arena};
|
|
||||||
use ra_cfg::CfgOptions;
|
use ra_cfg::CfgOptions;
|
||||||
use ra_db::CrateId;
|
use ra_db::CrateId;
|
||||||
use ra_prof::profile;
|
use ra_prof::profile;
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
|
|
||||||
use std::{any::type_name, sync::Arc};
|
use std::{any::type_name, sync::Arc};
|
||||||
|
|
||||||
|
use arena::Arena;
|
||||||
use either::Either;
|
use either::Either;
|
||||||
use hir_expand::{
|
use hir_expand::{
|
||||||
hygiene::Hygiene,
|
hygiene::Hygiene,
|
||||||
name::{name, AsName, Name},
|
name::{name, AsName, Name},
|
||||||
HirFileId, MacroDefId, MacroDefKind,
|
HirFileId, MacroDefId, MacroDefKind,
|
||||||
};
|
};
|
||||||
use ra_arena::Arena;
|
|
||||||
use ra_syntax::{
|
use ra_syntax::{
|
||||||
ast::{
|
ast::{
|
||||||
self, ArgListOwner, ArrayExprKind, AstChildren, LiteralKind, LoopBodyOwner, NameOwner,
|
self, ArgListOwner, ArrayExprKind, AstChildren, LiteralKind, LoopBodyOwner, NameOwner,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
//! Name resolution for expressions.
|
//! Name resolution for expressions.
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use arena::{Arena, Idx};
|
||||||
use hir_expand::name::Name;
|
use hir_expand::name::Name;
|
||||||
use ra_arena::{Arena, Idx};
|
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
//!
|
//!
|
||||||
//! See also a neighboring `body` module.
|
//! See also a neighboring `body` module.
|
||||||
|
|
||||||
|
use arena::{Idx, RawId};
|
||||||
use hir_expand::name::Name;
|
use hir_expand::name::Name;
|
||||||
use ra_arena::{Idx, RawId};
|
|
||||||
use ra_syntax::ast::RangeOp;
|
use ra_syntax::ast::RangeOp;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
//! in rustc.
|
//! in rustc.
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use arena::{map::ArenaMap, Arena};
|
||||||
use either::Either;
|
use either::Either;
|
||||||
use hir_expand::{
|
use hir_expand::{
|
||||||
name::{name, AsName, Name},
|
name::{name, AsName, Name},
|
||||||
InFile,
|
InFile,
|
||||||
};
|
};
|
||||||
use ra_arena::{map::ArenaMap, Arena};
|
|
||||||
use ra_db::FileId;
|
use ra_db::FileId;
|
||||||
use ra_prof::profile;
|
use ra_prof::profile;
|
||||||
use ra_syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner};
|
use ra_syntax::ast::{self, GenericParamsOwner, NameOwner, TypeBoundsOwner};
|
||||||
|
|
|
@ -13,6 +13,7 @@ use std::{
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use arena::{Arena, Idx, RawId};
|
||||||
use ast::{AstNode, AttrsOwner, NameOwner, StructKind};
|
use ast::{AstNode, AttrsOwner, NameOwner, StructKind};
|
||||||
use either::Either;
|
use either::Either;
|
||||||
use hir_expand::{
|
use hir_expand::{
|
||||||
|
@ -21,7 +22,6 @@ use hir_expand::{
|
||||||
name::{name, AsName, Name},
|
name::{name, AsName, Name},
|
||||||
HirFileId, InFile,
|
HirFileId, InFile,
|
||||||
};
|
};
|
||||||
use ra_arena::{Arena, Idx, RawId};
|
|
||||||
use ra_syntax::{ast, match_ast};
|
use ra_syntax::{ast, match_ast};
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
use std::{collections::hash_map::Entry, mem, sync::Arc};
|
use std::{collections::hash_map::Entry, mem, sync::Arc};
|
||||||
|
|
||||||
|
use arena::map::ArenaMap;
|
||||||
use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, HirFileId};
|
use hir_expand::{ast_id_map::AstIdMap, hygiene::Hygiene, HirFileId};
|
||||||
use ra_arena::map::ArenaMap;
|
|
||||||
use ra_syntax::{
|
use ra_syntax::{
|
||||||
ast::{self, ModuleItemOwner},
|
ast::{self, ModuleItemOwner},
|
||||||
SyntaxNode,
|
SyntaxNode,
|
||||||
|
|
|
@ -52,11 +52,11 @@ mod test_db;
|
||||||
|
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
|
|
||||||
|
use arena::Idx;
|
||||||
use hir_expand::{
|
use hir_expand::{
|
||||||
ast_id_map::FileAstId, eager::expand_eager_macro, hygiene::Hygiene, AstId, HirFileId, InFile,
|
ast_id_map::FileAstId, eager::expand_eager_macro, hygiene::Hygiene, AstId, HirFileId, InFile,
|
||||||
MacroCallId, MacroCallKind, MacroDefId, MacroDefKind,
|
MacroCallId, MacroCallKind, MacroDefId, MacroDefKind,
|
||||||
};
|
};
|
||||||
use ra_arena::Idx;
|
|
||||||
use ra_db::{impl_intern_key, salsa, CrateId};
|
use ra_db::{impl_intern_key, salsa, CrateId};
|
||||||
use ra_syntax::ast;
|
use ra_syntax::ast;
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,8 @@ mod tests;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use arena::Arena;
|
||||||
use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile};
|
use hir_expand::{diagnostics::DiagnosticSink, name::Name, InFile};
|
||||||
use ra_arena::Arena;
|
|
||||||
use ra_db::{CrateId, Edition, FileId};
|
use ra_db::{CrateId, Edition, FileId};
|
||||||
use ra_prof::profile;
|
use ra_prof::profile;
|
||||||
use ra_syntax::ast;
|
use ra_syntax::ast;
|
||||||
|
|
|
@ -1208,7 +1208,7 @@ fn is_macro_rules(path: &ModPath) -> bool {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::{db::DefDatabase, test_db::TestDB};
|
use crate::{db::DefDatabase, test_db::TestDB};
|
||||||
use ra_arena::Arena;
|
use arena::Arena;
|
||||||
use ra_db::{fixture::WithFixture, SourceDatabase};
|
use ra_db::{fixture::WithFixture, SourceDatabase};
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
//! Utilities for mapping between hir IDs and the surface syntax.
|
//! Utilities for mapping between hir IDs and the surface syntax.
|
||||||
|
|
||||||
|
use arena::map::ArenaMap;
|
||||||
use hir_expand::InFile;
|
use hir_expand::InFile;
|
||||||
use ra_arena::map::ArenaMap;
|
|
||||||
|
|
||||||
use crate::{db::DefDatabase, item_tree::ItemTreeNode, AssocItemLoc, ItemLoc};
|
use crate::{db::DefDatabase, item_tree::ItemTreeNode, AssocItemLoc, ItemLoc};
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
//! absolute offsets. The `Trace` structure (inspired, at least in name, by
|
//! absolute offsets. The `Trace` structure (inspired, at least in name, by
|
||||||
//! Kotlin's `BindingTrace`) allows use the same code to compute both
|
//! Kotlin's `BindingTrace`) allows use the same code to compute both
|
||||||
//! projections.
|
//! projections.
|
||||||
use ra_arena::{map::ArenaMap, Arena, Idx, RawId};
|
use arena::{map::ArenaMap, Arena, Idx, RawId};
|
||||||
|
|
||||||
pub(crate) struct Trace<T, V> {
|
pub(crate) struct Trace<T, V> {
|
||||||
arena: Option<Arena<T>>,
|
arena: Option<Arena<T>>,
|
||||||
|
|
|
@ -13,7 +13,7 @@ log = "0.4.8"
|
||||||
either = "1.5.3"
|
either = "1.5.3"
|
||||||
rustc-hash = "1.0.0"
|
rustc-hash = "1.0.0"
|
||||||
|
|
||||||
ra_arena = { path = "../ra_arena" }
|
arena = { path = "../arena" }
|
||||||
ra_db = { path = "../ra_db" }
|
ra_db = { path = "../ra_db" }
|
||||||
ra_syntax = { path = "../ra_syntax" }
|
ra_syntax = { path = "../ra_syntax" }
|
||||||
ra_parser = { path = "../ra_parser" }
|
ra_parser = { path = "../ra_parser" }
|
||||||
|
|
|
@ -12,7 +12,7 @@ use std::{
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
};
|
};
|
||||||
|
|
||||||
use ra_arena::{Arena, Idx};
|
use arena::{Arena, Idx};
|
||||||
use ra_syntax::{ast, AstNode, AstPtr, SyntaxNode, SyntaxNodePtr};
|
use ra_syntax::{ast, AstNode, AstPtr, SyntaxNode, SyntaxNodePtr};
|
||||||
|
|
||||||
/// `AstId` points to an AST node in a specific file.
|
/// `AstId` points to an AST node in a specific file.
|
||||||
|
|
|
@ -20,7 +20,7 @@ stdx = { path = "../stdx" }
|
||||||
|
|
||||||
hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
|
hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
|
||||||
hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
|
hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" }
|
||||||
ra_arena = { path = "../ra_arena" }
|
arena = { path = "../arena" }
|
||||||
ra_db = { path = "../ra_db" }
|
ra_db = { path = "../ra_db" }
|
||||||
ra_prof = { path = "../ra_prof" }
|
ra_prof = { path = "../ra_prof" }
|
||||||
ra_syntax = { path = "../ra_syntax" }
|
ra_syntax = { path = "../ra_syntax" }
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use arena::map::ArenaMap;
|
||||||
use hir_def::{
|
use hir_def::{
|
||||||
db::DefDatabase, expr::ExprId, DefWithBodyId, FunctionId, GenericDefId, ImplId, LocalFieldId,
|
db::DefDatabase, expr::ExprId, DefWithBodyId, FunctionId, GenericDefId, ImplId, LocalFieldId,
|
||||||
TypeParamId, VariantId,
|
TypeParamId, VariantId,
|
||||||
};
|
};
|
||||||
use ra_arena::map::ArenaMap;
|
|
||||||
use ra_db::{impl_intern_key, salsa, CrateId, Upcast};
|
use ra_db::{impl_intern_key, salsa, CrateId, Upcast};
|
||||||
use ra_prof::profile;
|
use ra_prof::profile;
|
||||||
|
|
||||||
|
|
|
@ -218,13 +218,13 @@
|
||||||
//! ```
|
//! ```
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use arena::Idx;
|
||||||
use hir_def::{
|
use hir_def::{
|
||||||
adt::VariantData,
|
adt::VariantData,
|
||||||
body::Body,
|
body::Body,
|
||||||
expr::{Expr, Literal, Pat, PatId},
|
expr::{Expr, Literal, Pat, PatId},
|
||||||
AdtId, EnumVariantId, VariantId,
|
AdtId, EnumVariantId, VariantId,
|
||||||
};
|
};
|
||||||
use ra_arena::Idx;
|
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
|
|
||||||
use crate::{db::HirDatabase, ApplicationTy, InferenceResult, Ty, TypeCtor};
|
use crate::{db::HirDatabase, ApplicationTy, InferenceResult, Ty, TypeCtor};
|
||||||
|
|
|
@ -18,6 +18,7 @@ use std::mem;
|
||||||
use std::ops::Index;
|
use std::ops::Index;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use arena::map::ArenaMap;
|
||||||
use hir_def::{
|
use hir_def::{
|
||||||
body::Body,
|
body::Body,
|
||||||
data::{ConstData, FunctionData, StaticData},
|
data::{ConstData, FunctionData, StaticData},
|
||||||
|
@ -30,7 +31,6 @@ use hir_def::{
|
||||||
TypeAliasId, VariantId,
|
TypeAliasId, VariantId,
|
||||||
};
|
};
|
||||||
use hir_expand::{diagnostics::DiagnosticSink, name::name};
|
use hir_expand::{diagnostics::DiagnosticSink, name::name};
|
||||||
use ra_arena::map::ArenaMap;
|
|
||||||
use ra_prof::profile;
|
use ra_prof::profile;
|
||||||
use ra_syntax::SmolStr;
|
use ra_syntax::SmolStr;
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
//! This usually involves resolving names, collecting generic arguments etc.
|
//! This usually involves resolving names, collecting generic arguments etc.
|
||||||
use std::{iter, sync::Arc};
|
use std::{iter, sync::Arc};
|
||||||
|
|
||||||
|
use arena::map::ArenaMap;
|
||||||
use hir_def::{
|
use hir_def::{
|
||||||
adt::StructKind,
|
adt::StructKind,
|
||||||
builtin_type::BuiltinType,
|
builtin_type::BuiltinType,
|
||||||
|
@ -19,7 +20,6 @@ use hir_def::{
|
||||||
UnionId, VariantId,
|
UnionId, VariantId,
|
||||||
};
|
};
|
||||||
use hir_expand::name::Name;
|
use hir_expand::name::Name;
|
||||||
use ra_arena::map::ArenaMap;
|
|
||||||
use ra_db::CrateId;
|
use ra_db::CrateId;
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use stdx::impl_from;
|
use stdx::impl_from;
|
||||||
|
|
|
@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"
|
||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ra_arena = { path = "../ra_arena" }
|
arena = { path = "../arena" }
|
||||||
once_cell = "1.3.1"
|
once_cell = "1.3.1"
|
||||||
backtrace = { version = "0.3.44", optional = true }
|
backtrace = { version = "0.3.44", optional = true }
|
||||||
cfg-if = "0.1.10"
|
cfg-if = "0.1.10"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
//! A simple tree implementation which tries to not allocate all over the place.
|
//! A simple tree implementation which tries to not allocate all over the place.
|
||||||
use std::ops;
|
use std::ops;
|
||||||
|
|
||||||
use ra_arena::Arena;
|
use arena::Arena;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Tree<T> {
|
pub struct Tree<T> {
|
||||||
|
@ -9,7 +9,7 @@ pub struct Tree<T> {
|
||||||
current_path: Vec<(Idx<T>, Option<Idx<T>>)>,
|
current_path: Vec<(Idx<T>, Option<Idx<T>>)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Idx<T> = ra_arena::Idx<Node<T>>;
|
pub type Idx<T> = arena::Idx<Node<T>>;
|
||||||
|
|
||||||
impl<T> Tree<T> {
|
impl<T> Tree<T> {
|
||||||
pub fn start(&mut self)
|
pub fn start(&mut self)
|
||||||
|
|
|
@ -14,7 +14,7 @@ rustc-hash = "1.1.0"
|
||||||
|
|
||||||
cargo_metadata = "0.11.1"
|
cargo_metadata = "0.11.1"
|
||||||
|
|
||||||
ra_arena = { path = "../ra_arena" }
|
arena = { path = "../arena" }
|
||||||
ra_cfg = { path = "../ra_cfg" }
|
ra_cfg = { path = "../ra_cfg" }
|
||||||
ra_db = { path = "../ra_db" }
|
ra_db = { path = "../ra_db" }
|
||||||
ra_toolchain = { path = "../ra_toolchain" }
|
ra_toolchain = { path = "../ra_toolchain" }
|
||||||
|
|
|
@ -8,9 +8,9 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
|
use arena::{Arena, Idx};
|
||||||
use cargo_metadata::{BuildScript, CargoOpt, Message, MetadataCommand, PackageId};
|
use cargo_metadata::{BuildScript, CargoOpt, Message, MetadataCommand, PackageId};
|
||||||
use paths::{AbsPath, AbsPathBuf};
|
use paths::{AbsPath, AbsPathBuf};
|
||||||
use ra_arena::{Arena, Idx};
|
|
||||||
use ra_db::Edition;
|
use ra_db::Edition;
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
use std::{convert::TryFrom, env, ops, path::Path, process::Command};
|
use std::{convert::TryFrom, env, ops, path::Path, process::Command};
|
||||||
|
|
||||||
use anyhow::{bail, format_err, Result};
|
use anyhow::{bail, format_err, Result};
|
||||||
|
use arena::{Arena, Idx};
|
||||||
use paths::{AbsPath, AbsPathBuf};
|
use paths::{AbsPath, AbsPathBuf};
|
||||||
use ra_arena::{Arena, Idx};
|
|
||||||
|
|
||||||
use crate::utf8_stdout;
|
use crate::utf8_stdout;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue