Rename ra_hir_expand -> hir_expand

This commit is contained in:
Aleksey Kladov 2020-08-13 16:26:29 +02:00
parent ed20a857f4
commit b7aa4898e0
19 changed files with 30 additions and 31 deletions

40
Cargo.lock generated
View File

@ -463,6 +463,23 @@ dependencies = [
"libc", "libc",
] ]
[[package]]
name = "hir_expand"
version = "0.0.0"
dependencies = [
"arena",
"base_db",
"either",
"log",
"mbe",
"parser",
"profile",
"rustc-hash",
"syntax",
"test_utils",
"tt",
]
[[package]] [[package]]
name = "home" name = "home"
version = "0.5.3" version = "0.5.3"
@ -1017,11 +1034,11 @@ dependencies = [
"arrayvec", "arrayvec",
"base_db", "base_db",
"either", "either",
"hir_expand",
"itertools", "itertools",
"log", "log",
"profile", "profile",
"ra_hir_def", "ra_hir_def",
"ra_hir_expand",
"ra_hir_ty", "ra_hir_ty",
"rustc-hash", "rustc-hash",
"stdx", "stdx",
@ -1040,13 +1057,13 @@ dependencies = [
"either", "either",
"expect", "expect",
"fst", "fst",
"hir_expand",
"indexmap", "indexmap",
"itertools", "itertools",
"log", "log",
"mbe", "mbe",
"once_cell", "once_cell",
"profile", "profile",
"ra_hir_expand",
"rustc-hash", "rustc-hash",
"smallvec", "smallvec",
"stdx", "stdx",
@ -1055,23 +1072,6 @@ dependencies = [
"tt", "tt",
] ]
[[package]]
name = "ra_hir_expand"
version = "0.1.0"
dependencies = [
"arena",
"base_db",
"either",
"log",
"mbe",
"parser",
"profile",
"rustc-hash",
"syntax",
"test_utils",
"tt",
]
[[package]] [[package]]
name = "ra_hir_ty" name = "ra_hir_ty"
version = "0.1.0" version = "0.1.0"
@ -1084,11 +1084,11 @@ dependencies = [
"chalk-solve", "chalk-solve",
"ena", "ena",
"expect", "expect",
"hir_expand",
"itertools", "itertools",
"log", "log",
"profile", "profile",
"ra_hir_def", "ra_hir_def",
"ra_hir_expand",
"rustc-hash", "rustc-hash",
"scoped-tls", "scoped-tls",
"smallvec", "smallvec",

View File

@ -1,9 +1,9 @@
[package] [package]
edition = "2018" name = "hir_expand"
name = "ra_hir_expand" 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

View File

@ -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 //! Specifically, it implements a concept of `MacroFile` -- a file whose syntax
//! tree originates not from the text of some `FileId`, but from some macro //! tree originates not from the text of some `FileId`, but from some macro

View File

@ -20,6 +20,6 @@ stdx = { path = "../stdx" }
syntax = { path = "../syntax" } syntax = { path = "../syntax" }
base_db = { path = "../base_db" } base_db = { path = "../base_db" }
profile = { path = "../profile" } profile = { path = "../profile" }
hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } hir_expand = { path = "../hir_expand" }
hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } hir_def = { path = "../ra_hir_def", package = "ra_hir_def" }
hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" }

View File

@ -815,7 +815,7 @@ pub struct MacroDef {
impl MacroDef { impl MacroDef {
/// FIXME: right now, this just returns the root module of the crate that /// 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 /// 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> { pub fn module(self, db: &dyn HirDatabase) -> Option<Module> {
let krate = self.id.krate?; let krate = self.id.krate?;
let module_id = db.crate_def_map(krate).root; let module_id = db.crate_def_map(krate).root;

View File

@ -21,12 +21,11 @@ indexmap = "1.4.0"
smallvec = "1.4.0" smallvec = "1.4.0"
stdx = { path = "../stdx" } stdx = { path = "../stdx" }
arena = { path = "../arena" } arena = { path = "../arena" }
base_db = { path = "../base_db" } base_db = { path = "../base_db" }
syntax = { path = "../syntax" } syntax = { path = "../syntax" }
profile = { path = "../profile" } profile = { path = "../profile" }
hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } hir_expand = { path = "../hir_expand" }
test_utils = { path = "../test_utils" } test_utils = { path = "../test_utils" }
mbe = { path = "../mbe" } mbe = { path = "../mbe" }
cfg = { path = "../cfg" } cfg = { path = "../cfg" }

View File

@ -19,7 +19,7 @@ rustc-hash = "1.1.0"
stdx = { path = "../stdx" } 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 = "../hir_expand" }
arena = { path = "../arena" } arena = { path = "../arena" }
base_db = { path = "../base_db" } base_db = { path = "../base_db" }
profile = { path = "../profile" } profile = { path = "../profile" }

View File

@ -193,7 +193,7 @@ fn finish(self) {
let poorly_documented = [ let poorly_documented = [
"ra_hir", "ra_hir",
"ra_hir_expand", "hir_expand",
"ra_ide", "ra_ide",
"mbe", "mbe",
"parser", "parser",