From 2f45cfc415626cfae5cba89c88a25fb3225486f7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 10:08:11 +0200 Subject: [PATCH] Rename ra_mbe -> mbe --- Cargo.lock | 36 +++++++++---------- crates/{ra_mbe => mbe}/Cargo.toml | 15 ++++---- crates/{ra_mbe => mbe}/src/lib.rs | 0 crates/{ra_mbe => mbe}/src/mbe_expander.rs | 0 .../src/mbe_expander/matcher.rs | 0 .../src/mbe_expander/transcriber.rs | 0 crates/{ra_mbe => mbe}/src/parser.rs | 0 crates/{ra_mbe => mbe}/src/subtree_source.rs | 0 crates/{ra_mbe => mbe}/src/syntax_bridge.rs | 0 crates/{ra_mbe => mbe}/src/tests.rs | 0 crates/{ra_mbe => mbe}/src/tt_iter.rs | 0 crates/proc_macro_srv/Cargo.toml | 2 +- crates/proc_macro_srv/src/rustc_server.rs | 2 +- crates/ra_cfg/Cargo.toml | 2 +- crates/ra_cfg/src/cfg_expr.rs | 2 +- crates/ra_hir_def/Cargo.toml | 2 +- crates/ra_hir_expand/Cargo.toml | 2 +- crates/rust-analyzer/Cargo.toml | 2 +- xtask/tests/tidy.rs | 2 +- 19 files changed, 34 insertions(+), 33 deletions(-) rename crates/{ra_mbe => mbe}/Cargo.toml (90%) rename crates/{ra_mbe => mbe}/src/lib.rs (100%) rename crates/{ra_mbe => mbe}/src/mbe_expander.rs (100%) rename crates/{ra_mbe => mbe}/src/mbe_expander/matcher.rs (100%) rename crates/{ra_mbe => mbe}/src/mbe_expander/transcriber.rs (100%) rename crates/{ra_mbe => mbe}/src/parser.rs (100%) rename crates/{ra_mbe => mbe}/src/subtree_source.rs (100%) rename crates/{ra_mbe => mbe}/src/syntax_bridge.rs (100%) rename crates/{ra_mbe => mbe}/src/tests.rs (100%) rename crates/{ra_mbe => mbe}/src/tt_iter.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 6bace7bd23..a63cd58f27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -635,6 +635,19 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" +[[package]] +name = "mbe" +version = "0.0.0" +dependencies = [ + "log", + "parser", + "rustc-hash", + "smallvec", + "syntax", + "test_utils", + "tt", +] + [[package]] name = "memmap" version = "0.7.0" @@ -894,8 +907,8 @@ dependencies = [ "difference", "goblin", "libloading", + "mbe", "memmap", - "ra_mbe", "ra_proc_macro", "serde_derive", "test_utils", @@ -946,7 +959,7 @@ dependencies = [ name = "ra_cfg" version = "0.1.0" dependencies = [ - "ra_mbe", + "mbe", "rustc-hash", "syntax", "tt", @@ -1006,12 +1019,12 @@ dependencies = [ "indexmap", "itertools", "log", + "mbe", "once_cell", "profile", "ra_cfg", "ra_db", "ra_hir_expand", - "ra_mbe", "rustc-hash", "smallvec", "stdx", @@ -1027,10 +1040,10 @@ dependencies = [ "arena", "either", "log", + "mbe", "parser", "profile", "ra_db", - "ra_mbe", "rustc-hash", "syntax", "test_utils", @@ -1109,19 +1122,6 @@ dependencies = [ "text_edit", ] -[[package]] -name = "ra_mbe" -version = "0.1.0" -dependencies = [ - "log", - "parser", - "rustc-hash", - "smallvec", - "syntax", - "test_utils", - "tt", -] - [[package]] name = "ra_proc_macro" version = "0.1.0" @@ -1249,6 +1249,7 @@ dependencies = [ "log", "lsp-server", "lsp-types", + "mbe", "mimalloc", "oorandom", "parking_lot", @@ -1262,7 +1263,6 @@ dependencies = [ "ra_hir_ty", "ra_ide", "ra_ide_db", - "ra_mbe", "ra_project_model", "ra_ssr", "rayon", diff --git a/crates/ra_mbe/Cargo.toml b/crates/mbe/Cargo.toml similarity index 90% rename from crates/ra_mbe/Cargo.toml rename to crates/mbe/Cargo.toml index 4a4be65ebc..1aba8b7c48 100644 --- a/crates/ra_mbe/Cargo.toml +++ b/crates/mbe/Cargo.toml @@ -1,20 +1,21 @@ [package] -edition = "2018" -name = "ra_mbe" -version = "0.1.0" -authors = ["rust-analyzer developers"] +name = "mbe" +version = "0.0.0" license = "MIT OR Apache-2.0" +authors = ["rust-analyzer developers"] +edition = "2018" [lib] doctest = false [dependencies] -syntax = { path = "../syntax" } -parser = { path = "../parser" } -tt = { path = "../tt" } rustc-hash = "1.1.0" smallvec = "1.2.0" log = "0.4.8" +syntax = { path = "../syntax" } +parser = { path = "../parser" } +tt = { path = "../tt" } + [dev-dependencies] test_utils = { path = "../test_utils" } diff --git a/crates/ra_mbe/src/lib.rs b/crates/mbe/src/lib.rs similarity index 100% rename from crates/ra_mbe/src/lib.rs rename to crates/mbe/src/lib.rs diff --git a/crates/ra_mbe/src/mbe_expander.rs b/crates/mbe/src/mbe_expander.rs similarity index 100% rename from crates/ra_mbe/src/mbe_expander.rs rename to crates/mbe/src/mbe_expander.rs diff --git a/crates/ra_mbe/src/mbe_expander/matcher.rs b/crates/mbe/src/mbe_expander/matcher.rs similarity index 100% rename from crates/ra_mbe/src/mbe_expander/matcher.rs rename to crates/mbe/src/mbe_expander/matcher.rs diff --git a/crates/ra_mbe/src/mbe_expander/transcriber.rs b/crates/mbe/src/mbe_expander/transcriber.rs similarity index 100% rename from crates/ra_mbe/src/mbe_expander/transcriber.rs rename to crates/mbe/src/mbe_expander/transcriber.rs diff --git a/crates/ra_mbe/src/parser.rs b/crates/mbe/src/parser.rs similarity index 100% rename from crates/ra_mbe/src/parser.rs rename to crates/mbe/src/parser.rs diff --git a/crates/ra_mbe/src/subtree_source.rs b/crates/mbe/src/subtree_source.rs similarity index 100% rename from crates/ra_mbe/src/subtree_source.rs rename to crates/mbe/src/subtree_source.rs diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/mbe/src/syntax_bridge.rs similarity index 100% rename from crates/ra_mbe/src/syntax_bridge.rs rename to crates/mbe/src/syntax_bridge.rs diff --git a/crates/ra_mbe/src/tests.rs b/crates/mbe/src/tests.rs similarity index 100% rename from crates/ra_mbe/src/tests.rs rename to crates/mbe/src/tests.rs diff --git a/crates/ra_mbe/src/tt_iter.rs b/crates/mbe/src/tt_iter.rs similarity index 100% rename from crates/ra_mbe/src/tt_iter.rs rename to crates/mbe/src/tt_iter.rs diff --git a/crates/proc_macro_srv/Cargo.toml b/crates/proc_macro_srv/Cargo.toml index f7d481cbab..0954ffb66f 100644 --- a/crates/proc_macro_srv/Cargo.toml +++ b/crates/proc_macro_srv/Cargo.toml @@ -14,7 +14,7 @@ libloading = "0.6.0" memmap = "0.7" tt = { path = "../tt" } -ra_mbe = { path = "../ra_mbe" } +mbe = { path = "../mbe" } ra_proc_macro = { path = "../ra_proc_macro" } test_utils = { path = "../test_utils" } diff --git a/crates/proc_macro_srv/src/rustc_server.rs b/crates/proc_macro_srv/src/rustc_server.rs index d534d1337f..7d1695c86a 100644 --- a/crates/proc_macro_srv/src/rustc_server.rs +++ b/crates/proc_macro_srv/src/rustc_server.rs @@ -182,7 +182,7 @@ pub mod token_stream { fn from_str(src: &str) -> Result { let (subtree, _token_map) = - ra_mbe::parse_to_token_tree(src).ok_or("Failed to parse from mbe")?; + mbe::parse_to_token_tree(src).ok_or("Failed to parse from mbe")?; let tt: tt::TokenTree = subtree.into(); Ok(tt.into()) diff --git a/crates/ra_cfg/Cargo.toml b/crates/ra_cfg/Cargo.toml index cb0d2b9d73..e77c7bd720 100644 --- a/crates/ra_cfg/Cargo.toml +++ b/crates/ra_cfg/Cargo.toml @@ -15,4 +15,4 @@ syntax = { path = "../syntax" } tt = { path = "../tt" } [dev-dependencies] -mbe = { path = "../ra_mbe", package = "ra_mbe" } +mbe = { path = "../mbe" } diff --git a/crates/ra_cfg/src/cfg_expr.rs b/crates/ra_cfg/src/cfg_expr.rs index 940091465c..fc93730d99 100644 --- a/crates/ra_cfg/src/cfg_expr.rs +++ b/crates/ra_cfg/src/cfg_expr.rs @@ -4,7 +4,7 @@ use std::slice::Iter as SliceIter; -use syntax::SmolStr; +use tt::SmolStr; #[derive(Debug, Clone, PartialEq, Eq)] pub enum CfgExpr { diff --git a/crates/ra_hir_def/Cargo.toml b/crates/ra_hir_def/Cargo.toml index 38129782fe..ba7916c305 100644 --- a/crates/ra_hir_def/Cargo.toml +++ b/crates/ra_hir_def/Cargo.toml @@ -28,7 +28,7 @@ syntax = { path = "../syntax" } profile = { path = "../profile" } hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } test_utils = { path = "../test_utils" } -mbe = { path = "../ra_mbe", package = "ra_mbe" } +mbe = { path = "../mbe" } ra_cfg = { path = "../ra_cfg" } tt = { path = "../tt" } diff --git a/crates/ra_hir_expand/Cargo.toml b/crates/ra_hir_expand/Cargo.toml index 153a70bdf5..cbb0ac29b8 100644 --- a/crates/ra_hir_expand/Cargo.toml +++ b/crates/ra_hir_expand/Cargo.toml @@ -19,5 +19,5 @@ syntax = { path = "../syntax" } parser = { path = "../parser" } profile = { path = "../profile" } tt = { path = "../tt" } -mbe = { path = "../ra_mbe", package = "ra_mbe" } +mbe = { path = "../mbe" } test_utils = { path = "../test_utils"} diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml index 7713ed7eab..156f8d538e 100644 --- a/crates/rust-analyzer/Cargo.toml +++ b/crates/rust-analyzer/Cargo.toml @@ -60,5 +60,5 @@ winapi = "0.3.8" [dev-dependencies] expect = { path = "../expect" } test_utils = { path = "../test_utils" } -mbe = { path = "../ra_mbe", package = "ra_mbe" } +mbe = { path = "../mbe" } tt = { path = "../tt" } diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index 8c608284a4..0188aaa2ec 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -195,7 +195,7 @@ impl TidyDocs { "ra_hir", "ra_hir_expand", "ra_ide", - "ra_mbe", + "mbe", "parser", "profile", "ra_project_model",