From 6a77ec7bbe6ddbf663dce9529d11d1bb56c5489a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 16:35:29 +0200 Subject: [PATCH] Rename ra_hir_ty -> hir_ty --- Cargo.lock | 60 +++++++++---------- crates/{ra_hir_ty => hir_ty}/Cargo.toml | 23 ++++--- crates/{ra_hir_ty => hir_ty}/src/autoderef.rs | 0 crates/{ra_hir_ty => hir_ty}/src/db.rs | 0 .../{ra_hir_ty => hir_ty}/src/diagnostics.rs | 0 .../src/diagnostics/expr.rs | 0 .../src/diagnostics/match_check.rs | 0 .../src/diagnostics/unsafe_check.rs | 0 crates/{ra_hir_ty => hir_ty}/src/display.rs | 0 crates/{ra_hir_ty => hir_ty}/src/infer.rs | 0 .../{ra_hir_ty => hir_ty}/src/infer/coerce.rs | 0 .../{ra_hir_ty => hir_ty}/src/infer/expr.rs | 0 crates/{ra_hir_ty => hir_ty}/src/infer/pat.rs | 0 .../{ra_hir_ty => hir_ty}/src/infer/path.rs | 0 .../{ra_hir_ty => hir_ty}/src/infer/unify.rs | 0 crates/{ra_hir_ty => hir_ty}/src/lib.rs | 0 crates/{ra_hir_ty => hir_ty}/src/lower.rs | 0 .../src/method_resolution.rs | 0 crates/{ra_hir_ty => hir_ty}/src/op.rs | 0 crates/{ra_hir_ty => hir_ty}/src/primitive.rs | 0 crates/{ra_hir_ty => hir_ty}/src/test_db.rs | 0 crates/{ra_hir_ty => hir_ty}/src/tests.rs | 2 +- .../src/tests/coercion.rs | 0 .../src/tests/display_source_code.rs | 0 .../{ra_hir_ty => hir_ty}/src/tests/macros.rs | 0 .../src/tests/method_resolution.rs | 0 .../src/tests/never_type.rs | 0 .../src/tests/patterns.rs | 0 .../src/tests/regression.rs | 0 .../{ra_hir_ty => hir_ty}/src/tests/simple.rs | 0 .../{ra_hir_ty => hir_ty}/src/tests/traits.rs | 0 crates/{ra_hir_ty => hir_ty}/src/traits.rs | 0 .../{ra_hir_ty => hir_ty}/src/traits/chalk.rs | 0 .../src/traits/chalk/interner.rs | 0 .../src/traits/chalk/mapping.rs | 0 .../src/traits/chalk/tls.rs | 0 crates/{ra_hir_ty => hir_ty}/src/utils.rs | 0 crates/ra_hir/Cargo.toml | 2 +- crates/rust-analyzer/Cargo.toml | 2 +- xtask/tests/tidy.rs | 2 +- 40 files changed, 44 insertions(+), 47 deletions(-) rename crates/{ra_hir_ty => hir_ty}/Cargo.toml (95%) rename crates/{ra_hir_ty => hir_ty}/src/autoderef.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/db.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/diagnostics.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/diagnostics/expr.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/diagnostics/match_check.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/diagnostics/unsafe_check.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/display.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/infer.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/infer/coerce.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/infer/expr.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/infer/pat.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/infer/path.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/infer/unify.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/lib.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/lower.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/method_resolution.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/op.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/primitive.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/test_db.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/tests.rs (99%) rename crates/{ra_hir_ty => hir_ty}/src/tests/coercion.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/tests/display_source_code.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/tests/macros.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/tests/method_resolution.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/tests/never_type.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/tests/patterns.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/tests/regression.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/tests/simple.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/tests/traits.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/traits.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/traits/chalk.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/traits/chalk/interner.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/traits/chalk/mapping.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/traits/chalk/tls.rs (100%) rename crates/{ra_hir_ty => hir_ty}/src/utils.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 702bd5191d..6ecea36470 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -507,6 +507,34 @@ dependencies = [ "tt", ] +[[package]] +name = "hir_ty" +version = "0.0.0" +dependencies = [ + "arena", + "arrayvec", + "base_db", + "chalk-ir", + "chalk-recursive", + "chalk-solve", + "ena", + "expect", + "hir_def", + "hir_expand", + "itertools", + "log", + "profile", + "rustc-hash", + "scoped-tls", + "smallvec", + "stdx", + "syntax", + "test_utils", + "tracing", + "tracing-subscriber", + "tracing-tree", +] + [[package]] name = "home" version = "0.5.3" @@ -1063,41 +1091,13 @@ dependencies = [ "either", "hir_def", "hir_expand", - "itertools", - "log", - "profile", - "ra_hir_ty", - "rustc-hash", - "stdx", - "syntax", -] - -[[package]] -name = "ra_hir_ty" -version = "0.1.0" -dependencies = [ - "arena", - "arrayvec", - "base_db", - "chalk-ir", - "chalk-recursive", - "chalk-solve", - "ena", - "expect", - "hir_def", - "hir_expand", + "hir_ty", "itertools", "log", "profile", "rustc-hash", - "scoped-tls", - "smallvec", "stdx", "syntax", - "test_utils", - "tracing", - "tracing-subscriber", - "tracing-tree", ] [[package]] @@ -1237,6 +1237,7 @@ dependencies = [ "expect", "flycheck", "hir_def", + "hir_ty", "itertools", "jod-thread", "log", @@ -1251,7 +1252,6 @@ dependencies = [ "profile", "project_model", "ra_hir", - "ra_hir_ty", "ra_ide", "ra_ide_db", "ra_ssr", diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/hir_ty/Cargo.toml similarity index 95% rename from crates/ra_hir_ty/Cargo.toml rename to crates/hir_ty/Cargo.toml index d430b08ca7..83b5013a90 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/hir_ty/Cargo.toml @@ -1,9 +1,9 @@ [package] -edition = "2018" -name = "ra_hir_ty" -version = "0.1.0" -authors = ["rust-analyzer developers"] +name = "hir_ty" +version = "0.0.0" license = "MIT OR Apache-2.0" +authors = ["rust-analyzer developers"] +edition = "2018" [lib] doctest = false @@ -15,9 +15,12 @@ smallvec = "1.2.0" ena = "0.14.0" log = "0.4.8" rustc-hash = "1.1.0" +scoped-tls = "1" +chalk-solve = { version = "0.21.0" } +chalk-ir = { version = "0.21.0" } +chalk-recursive = { version = "0.21.0" } stdx = { path = "../stdx" } - hir_def = { path = "../hir_def" } hir_expand = { path = "../hir_expand" } arena = { path = "../arena" } @@ -26,15 +29,9 @@ profile = { path = "../profile" } syntax = { path = "../syntax" } test_utils = { path = "../test_utils" } -scoped-tls = "1" - -chalk-solve = { version = "0.21.0" } -chalk-ir = { version = "0.21.0" } -chalk-recursive = { version = "0.21.0" } - [dev-dependencies] -expect = { path = "../expect" } - tracing = "0.1" tracing-subscriber = { version = "0.2", default-features = false, features = ["env-filter", "registry"] } tracing-tree = { version = "0.1.4" } + +expect = { path = "../expect" } diff --git a/crates/ra_hir_ty/src/autoderef.rs b/crates/hir_ty/src/autoderef.rs similarity index 100% rename from crates/ra_hir_ty/src/autoderef.rs rename to crates/hir_ty/src/autoderef.rs diff --git a/crates/ra_hir_ty/src/db.rs b/crates/hir_ty/src/db.rs similarity index 100% rename from crates/ra_hir_ty/src/db.rs rename to crates/hir_ty/src/db.rs diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/hir_ty/src/diagnostics.rs similarity index 100% rename from crates/ra_hir_ty/src/diagnostics.rs rename to crates/hir_ty/src/diagnostics.rs diff --git a/crates/ra_hir_ty/src/diagnostics/expr.rs b/crates/hir_ty/src/diagnostics/expr.rs similarity index 100% rename from crates/ra_hir_ty/src/diagnostics/expr.rs rename to crates/hir_ty/src/diagnostics/expr.rs diff --git a/crates/ra_hir_ty/src/diagnostics/match_check.rs b/crates/hir_ty/src/diagnostics/match_check.rs similarity index 100% rename from crates/ra_hir_ty/src/diagnostics/match_check.rs rename to crates/hir_ty/src/diagnostics/match_check.rs diff --git a/crates/ra_hir_ty/src/diagnostics/unsafe_check.rs b/crates/hir_ty/src/diagnostics/unsafe_check.rs similarity index 100% rename from crates/ra_hir_ty/src/diagnostics/unsafe_check.rs rename to crates/hir_ty/src/diagnostics/unsafe_check.rs diff --git a/crates/ra_hir_ty/src/display.rs b/crates/hir_ty/src/display.rs similarity index 100% rename from crates/ra_hir_ty/src/display.rs rename to crates/hir_ty/src/display.rs diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/hir_ty/src/infer.rs similarity index 100% rename from crates/ra_hir_ty/src/infer.rs rename to crates/hir_ty/src/infer.rs diff --git a/crates/ra_hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs similarity index 100% rename from crates/ra_hir_ty/src/infer/coerce.rs rename to crates/hir_ty/src/infer/coerce.rs diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs similarity index 100% rename from crates/ra_hir_ty/src/infer/expr.rs rename to crates/hir_ty/src/infer/expr.rs diff --git a/crates/ra_hir_ty/src/infer/pat.rs b/crates/hir_ty/src/infer/pat.rs similarity index 100% rename from crates/ra_hir_ty/src/infer/pat.rs rename to crates/hir_ty/src/infer/pat.rs diff --git a/crates/ra_hir_ty/src/infer/path.rs b/crates/hir_ty/src/infer/path.rs similarity index 100% rename from crates/ra_hir_ty/src/infer/path.rs rename to crates/hir_ty/src/infer/path.rs diff --git a/crates/ra_hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs similarity index 100% rename from crates/ra_hir_ty/src/infer/unify.rs rename to crates/hir_ty/src/infer/unify.rs diff --git a/crates/ra_hir_ty/src/lib.rs b/crates/hir_ty/src/lib.rs similarity index 100% rename from crates/ra_hir_ty/src/lib.rs rename to crates/hir_ty/src/lib.rs diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs similarity index 100% rename from crates/ra_hir_ty/src/lower.rs rename to crates/hir_ty/src/lower.rs diff --git a/crates/ra_hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs similarity index 100% rename from crates/ra_hir_ty/src/method_resolution.rs rename to crates/hir_ty/src/method_resolution.rs diff --git a/crates/ra_hir_ty/src/op.rs b/crates/hir_ty/src/op.rs similarity index 100% rename from crates/ra_hir_ty/src/op.rs rename to crates/hir_ty/src/op.rs diff --git a/crates/ra_hir_ty/src/primitive.rs b/crates/hir_ty/src/primitive.rs similarity index 100% rename from crates/ra_hir_ty/src/primitive.rs rename to crates/hir_ty/src/primitive.rs diff --git a/crates/ra_hir_ty/src/test_db.rs b/crates/hir_ty/src/test_db.rs similarity index 100% rename from crates/ra_hir_ty/src/test_db.rs rename to crates/hir_ty/src/test_db.rs diff --git a/crates/ra_hir_ty/src/tests.rs b/crates/hir_ty/src/tests.rs similarity index 99% rename from crates/ra_hir_ty/src/tests.rs rename to crates/hir_ty/src/tests.rs index f6b172c3af..c953925ecb 100644 --- a/crates/ra_hir_ty/src/tests.rs +++ b/crates/hir_ty/src/tests.rs @@ -35,7 +35,7 @@ use crate::{ // These tests compare the inference results for all expressions in a file // against snapshots of the expected results using expect. Use -// `env UPDATE_EXPECT=1 cargo test -p ra_hir_ty` to update the snapshots. +// `env UPDATE_EXPECT=1 cargo test -p hir_ty` to update the snapshots. fn setup_tracing() -> tracing::subscriber::DefaultGuard { use tracing_subscriber::{layer::SubscriberExt, EnvFilter, Registry}; diff --git a/crates/ra_hir_ty/src/tests/coercion.rs b/crates/hir_ty/src/tests/coercion.rs similarity index 100% rename from crates/ra_hir_ty/src/tests/coercion.rs rename to crates/hir_ty/src/tests/coercion.rs diff --git a/crates/ra_hir_ty/src/tests/display_source_code.rs b/crates/hir_ty/src/tests/display_source_code.rs similarity index 100% rename from crates/ra_hir_ty/src/tests/display_source_code.rs rename to crates/hir_ty/src/tests/display_source_code.rs diff --git a/crates/ra_hir_ty/src/tests/macros.rs b/crates/hir_ty/src/tests/macros.rs similarity index 100% rename from crates/ra_hir_ty/src/tests/macros.rs rename to crates/hir_ty/src/tests/macros.rs diff --git a/crates/ra_hir_ty/src/tests/method_resolution.rs b/crates/hir_ty/src/tests/method_resolution.rs similarity index 100% rename from crates/ra_hir_ty/src/tests/method_resolution.rs rename to crates/hir_ty/src/tests/method_resolution.rs diff --git a/crates/ra_hir_ty/src/tests/never_type.rs b/crates/hir_ty/src/tests/never_type.rs similarity index 100% rename from crates/ra_hir_ty/src/tests/never_type.rs rename to crates/hir_ty/src/tests/never_type.rs diff --git a/crates/ra_hir_ty/src/tests/patterns.rs b/crates/hir_ty/src/tests/patterns.rs similarity index 100% rename from crates/ra_hir_ty/src/tests/patterns.rs rename to crates/hir_ty/src/tests/patterns.rs diff --git a/crates/ra_hir_ty/src/tests/regression.rs b/crates/hir_ty/src/tests/regression.rs similarity index 100% rename from crates/ra_hir_ty/src/tests/regression.rs rename to crates/hir_ty/src/tests/regression.rs diff --git a/crates/ra_hir_ty/src/tests/simple.rs b/crates/hir_ty/src/tests/simple.rs similarity index 100% rename from crates/ra_hir_ty/src/tests/simple.rs rename to crates/hir_ty/src/tests/simple.rs diff --git a/crates/ra_hir_ty/src/tests/traits.rs b/crates/hir_ty/src/tests/traits.rs similarity index 100% rename from crates/ra_hir_ty/src/tests/traits.rs rename to crates/hir_ty/src/tests/traits.rs diff --git a/crates/ra_hir_ty/src/traits.rs b/crates/hir_ty/src/traits.rs similarity index 100% rename from crates/ra_hir_ty/src/traits.rs rename to crates/hir_ty/src/traits.rs diff --git a/crates/ra_hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs similarity index 100% rename from crates/ra_hir_ty/src/traits/chalk.rs rename to crates/hir_ty/src/traits/chalk.rs diff --git a/crates/ra_hir_ty/src/traits/chalk/interner.rs b/crates/hir_ty/src/traits/chalk/interner.rs similarity index 100% rename from crates/ra_hir_ty/src/traits/chalk/interner.rs rename to crates/hir_ty/src/traits/chalk/interner.rs diff --git a/crates/ra_hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs similarity index 100% rename from crates/ra_hir_ty/src/traits/chalk/mapping.rs rename to crates/hir_ty/src/traits/chalk/mapping.rs diff --git a/crates/ra_hir_ty/src/traits/chalk/tls.rs b/crates/hir_ty/src/traits/chalk/tls.rs similarity index 100% rename from crates/ra_hir_ty/src/traits/chalk/tls.rs rename to crates/hir_ty/src/traits/chalk/tls.rs diff --git a/crates/ra_hir_ty/src/utils.rs b/crates/hir_ty/src/utils.rs similarity index 100% rename from crates/ra_hir_ty/src/utils.rs rename to crates/hir_ty/src/utils.rs diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml index edca5dc6f8..61cc099ac7 100644 --- a/crates/ra_hir/Cargo.toml +++ b/crates/ra_hir/Cargo.toml @@ -22,4 +22,4 @@ base_db = { path = "../base_db" } profile = { path = "../profile" } hir_expand = { path = "../hir_expand" } hir_def = { path = "../hir_def" } -hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } +hir_ty = { path = "../hir_ty" } diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml index 0dee719de5..e17fe47dae 100644 --- a/crates/rust-analyzer/Cargo.toml +++ b/crates/rust-analyzer/Cargo.toml @@ -51,7 +51,7 @@ ra_ide_db = { path = "../ra_ide_db" } ra_ssr = { path = "../ra_ssr" } hir = { path = "../ra_hir", package = "ra_hir" } hir_def = { path = "../hir_def" } -hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } +hir_ty = { path = "../hir_ty" } proc_macro_srv = { path = "../proc_macro_srv" } [target.'cfg(windows)'.dependencies] diff --git a/xtask/tests/tidy.rs b/xtask/tests/tidy.rs index dc367d1e03..5a5bd4a3ee 100644 --- a/xtask/tests/tidy.rs +++ b/xtask/tests/tidy.rs @@ -201,7 +201,7 @@ impl TidyDocs { "project_model", "syntax", "tt", - "ra_hir_ty", + "hir_ty", ]; let mut has_fixmes =