diff --git a/Cargo.lock b/Cargo.lock index a99dd6e04ab..768c3293d56 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -463,6 +463,23 @@ dependencies = [ "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]] name = "home" version = "0.5.3" @@ -1017,11 +1034,11 @@ dependencies = [ "arrayvec", "base_db", "either", + "hir_expand", "itertools", "log", "profile", "ra_hir_def", - "ra_hir_expand", "ra_hir_ty", "rustc-hash", "stdx", @@ -1040,13 +1057,13 @@ dependencies = [ "either", "expect", "fst", + "hir_expand", "indexmap", "itertools", "log", "mbe", "once_cell", "profile", - "ra_hir_expand", "rustc-hash", "smallvec", "stdx", @@ -1055,23 +1072,6 @@ dependencies = [ "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]] name = "ra_hir_ty" version = "0.1.0" @@ -1084,11 +1084,11 @@ dependencies = [ "chalk-solve", "ena", "expect", + "hir_expand", "itertools", "log", "profile", "ra_hir_def", - "ra_hir_expand", "rustc-hash", "scoped-tls", "smallvec", diff --git a/crates/ra_hir_expand/Cargo.toml b/crates/hir_expand/Cargo.toml similarity index 91% rename from crates/ra_hir_expand/Cargo.toml rename to crates/hir_expand/Cargo.toml index 41acf371229..1c46992915e 100644 --- a/crates/ra_hir_expand/Cargo.toml +++ b/crates/hir_expand/Cargo.toml @@ -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 diff --git a/crates/ra_hir_expand/src/ast_id_map.rs b/crates/hir_expand/src/ast_id_map.rs similarity index 100% rename from crates/ra_hir_expand/src/ast_id_map.rs rename to crates/hir_expand/src/ast_id_map.rs diff --git a/crates/ra_hir_expand/src/builtin_derive.rs b/crates/hir_expand/src/builtin_derive.rs similarity index 100% rename from crates/ra_hir_expand/src/builtin_derive.rs rename to crates/hir_expand/src/builtin_derive.rs diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/hir_expand/src/builtin_macro.rs similarity index 100% rename from crates/ra_hir_expand/src/builtin_macro.rs rename to crates/hir_expand/src/builtin_macro.rs diff --git a/crates/ra_hir_expand/src/db.rs b/crates/hir_expand/src/db.rs similarity index 100% rename from crates/ra_hir_expand/src/db.rs rename to crates/hir_expand/src/db.rs diff --git a/crates/ra_hir_expand/src/diagnostics.rs b/crates/hir_expand/src/diagnostics.rs similarity index 100% rename from crates/ra_hir_expand/src/diagnostics.rs rename to crates/hir_expand/src/diagnostics.rs diff --git a/crates/ra_hir_expand/src/eager.rs b/crates/hir_expand/src/eager.rs similarity index 100% rename from crates/ra_hir_expand/src/eager.rs rename to crates/hir_expand/src/eager.rs diff --git a/crates/ra_hir_expand/src/hygiene.rs b/crates/hir_expand/src/hygiene.rs similarity index 100% rename from crates/ra_hir_expand/src/hygiene.rs rename to crates/hir_expand/src/hygiene.rs diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs similarity index 99% rename from crates/ra_hir_expand/src/lib.rs rename to crates/hir_expand/src/lib.rs index 7425b561aca..2be15e84132 100644 --- a/crates/ra_hir_expand/src/lib.rs +++ b/crates/hir_expand/src/lib.rs @@ -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 diff --git a/crates/ra_hir_expand/src/name.rs b/crates/hir_expand/src/name.rs similarity index 100% rename from crates/ra_hir_expand/src/name.rs rename to crates/hir_expand/src/name.rs diff --git a/crates/ra_hir_expand/src/proc_macro.rs b/crates/hir_expand/src/proc_macro.rs similarity index 100% rename from crates/ra_hir_expand/src/proc_macro.rs rename to crates/hir_expand/src/proc_macro.rs diff --git a/crates/ra_hir_expand/src/quote.rs b/crates/hir_expand/src/quote.rs similarity index 100% rename from crates/ra_hir_expand/src/quote.rs rename to crates/hir_expand/src/quote.rs diff --git a/crates/ra_hir_expand/src/test_db.rs b/crates/hir_expand/src/test_db.rs similarity index 100% rename from crates/ra_hir_expand/src/test_db.rs rename to crates/hir_expand/src/test_db.rs diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml index 5ccdb74fd62..0ec1589c198 100644 --- a/crates/ra_hir/Cargo.toml +++ b/crates/ra_hir/Cargo.toml @@ -20,6 +20,6 @@ stdx = { path = "../stdx" } syntax = { path = "../syntax" } base_db = { path = "../base_db" } 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_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index d4d6b1759c7..8ffb9e99b0e 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -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 { let krate = self.id.krate?; let module_id = db.crate_def_map(krate).root; diff --git a/crates/ra_hir_def/Cargo.toml b/crates/ra_hir_def/Cargo.toml index 2b187bc4a06..f93a213dfb3 100644 --- a/crates/ra_hir_def/Cargo.toml +++ b/crates/ra_hir_def/Cargo.toml @@ -21,12 +21,11 @@ indexmap = "1.4.0" smallvec = "1.4.0" stdx = { path = "../stdx" } - arena = { path = "../arena" } 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" } diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml index 720d171aca3..75f04f9dd0c 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/ra_hir_ty/Cargo.toml @@ -19,7 +19,7 @@ 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_expand = { path = "../hir_expand" } arena = { path = "../arena" } base_db = { path = "../base_db" } profile = { path = "../profile" } diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 2e68e71db25..dc367d1e03a 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -193,7 +193,7 @@ fn finish(self) { let poorly_documented = [ "ra_hir", - "ra_hir_expand", + "hir_expand", "ra_ide", "mbe", "parser",