From b28c54a2c239acd73f2eea80fda9ee3960d2c046 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 16:28:27 +0200 Subject: [PATCH] Rename ra_hir_def -> hir_def --- Cargo.lock | 60 +++++++++---------- crates/{ra_hir_def => hir_def}/Cargo.toml | 8 +-- crates/{ra_hir_def => hir_def}/src/adt.rs | 0 crates/{ra_hir_def => hir_def}/src/attr.rs | 0 crates/{ra_hir_def => hir_def}/src/body.rs | 0 .../{ra_hir_def => hir_def}/src/body/lower.rs | 0 .../{ra_hir_def => hir_def}/src/body/scope.rs | 0 .../src/builtin_type.rs | 0 .../src/child_by_source.rs | 0 crates/{ra_hir_def => hir_def}/src/data.rs | 0 crates/{ra_hir_def => hir_def}/src/db.rs | 0 .../src/diagnostics.rs | 0 crates/{ra_hir_def => hir_def}/src/docs.rs | 0 crates/{ra_hir_def => hir_def}/src/dyn_map.rs | 0 crates/{ra_hir_def => hir_def}/src/expr.rs | 0 .../{ra_hir_def => hir_def}/src/find_path.rs | 0 .../{ra_hir_def => hir_def}/src/generics.rs | 0 .../{ra_hir_def => hir_def}/src/import_map.rs | 0 .../{ra_hir_def => hir_def}/src/item_scope.rs | 0 .../{ra_hir_def => hir_def}/src/item_tree.rs | 0 .../src/item_tree/lower.rs | 0 .../src/item_tree/tests.rs | 8 +-- crates/{ra_hir_def => hir_def}/src/keys.rs | 0 .../{ra_hir_def => hir_def}/src/lang_item.rs | 0 crates/{ra_hir_def => hir_def}/src/lib.rs | 0 crates/{ra_hir_def => hir_def}/src/nameres.rs | 0 .../src/nameres/collector.rs | 0 .../src/nameres/mod_resolution.rs | 0 .../src/nameres/path_resolution.rs | 0 .../src/nameres/tests.rs | 0 .../src/nameres/tests/globs.rs | 0 .../src/nameres/tests/incremental.rs | 0 .../src/nameres/tests/macros.rs | 0 .../src/nameres/tests/mod_resolution.rs | 0 .../src/nameres/tests/primitives.rs | 0 crates/{ra_hir_def => hir_def}/src/path.rs | 0 .../{ra_hir_def => hir_def}/src/path/lower.rs | 0 .../src/path/lower/lower_use.rs | 0 crates/{ra_hir_def => hir_def}/src/per_ns.rs | 0 .../{ra_hir_def => hir_def}/src/resolver.rs | 0 crates/{ra_hir_def => hir_def}/src/src.rs | 0 crates/{ra_hir_def => hir_def}/src/test_db.rs | 0 crates/{ra_hir_def => hir_def}/src/trace.rs | 0 .../{ra_hir_def => hir_def}/src/type_ref.rs | 0 .../{ra_hir_def => hir_def}/src/visibility.rs | 0 crates/ra_hir/Cargo.toml | 2 +- crates/ra_hir_ty/Cargo.toml | 2 +- crates/ra_hir_ty/src/tests/simple.rs | 4 +- crates/rust-analyzer/Cargo.toml | 2 +- .../rust-analyzer/src/diagnostics/to_proto.rs | 12 ++-- .../test_data/macro_compiler_error.txt | 4 +- 51 files changed, 51 insertions(+), 51 deletions(-) rename crates/{ra_hir_def => hir_def}/Cargo.toml (95%) rename crates/{ra_hir_def => hir_def}/src/adt.rs (100%) rename crates/{ra_hir_def => hir_def}/src/attr.rs (100%) rename crates/{ra_hir_def => hir_def}/src/body.rs (100%) rename crates/{ra_hir_def => hir_def}/src/body/lower.rs (100%) rename crates/{ra_hir_def => hir_def}/src/body/scope.rs (100%) rename crates/{ra_hir_def => hir_def}/src/builtin_type.rs (100%) rename crates/{ra_hir_def => hir_def}/src/child_by_source.rs (100%) rename crates/{ra_hir_def => hir_def}/src/data.rs (100%) rename crates/{ra_hir_def => hir_def}/src/db.rs (100%) rename crates/{ra_hir_def => hir_def}/src/diagnostics.rs (100%) rename crates/{ra_hir_def => hir_def}/src/docs.rs (100%) rename crates/{ra_hir_def => hir_def}/src/dyn_map.rs (100%) rename crates/{ra_hir_def => hir_def}/src/expr.rs (100%) rename crates/{ra_hir_def => hir_def}/src/find_path.rs (100%) rename crates/{ra_hir_def => hir_def}/src/generics.rs (100%) rename crates/{ra_hir_def => hir_def}/src/import_map.rs (100%) rename crates/{ra_hir_def => hir_def}/src/item_scope.rs (100%) rename crates/{ra_hir_def => hir_def}/src/item_tree.rs (100%) rename crates/{ra_hir_def => hir_def}/src/item_tree/lower.rs (100%) rename crates/{ra_hir_def => hir_def}/src/item_tree/tests.rs (97%) rename crates/{ra_hir_def => hir_def}/src/keys.rs (100%) rename crates/{ra_hir_def => hir_def}/src/lang_item.rs (100%) rename crates/{ra_hir_def => hir_def}/src/lib.rs (100%) rename crates/{ra_hir_def => hir_def}/src/nameres.rs (100%) rename crates/{ra_hir_def => hir_def}/src/nameres/collector.rs (100%) rename crates/{ra_hir_def => hir_def}/src/nameres/mod_resolution.rs (100%) rename crates/{ra_hir_def => hir_def}/src/nameres/path_resolution.rs (100%) rename crates/{ra_hir_def => hir_def}/src/nameres/tests.rs (100%) rename crates/{ra_hir_def => hir_def}/src/nameres/tests/globs.rs (100%) rename crates/{ra_hir_def => hir_def}/src/nameres/tests/incremental.rs (100%) rename crates/{ra_hir_def => hir_def}/src/nameres/tests/macros.rs (100%) rename crates/{ra_hir_def => hir_def}/src/nameres/tests/mod_resolution.rs (100%) rename crates/{ra_hir_def => hir_def}/src/nameres/tests/primitives.rs (100%) rename crates/{ra_hir_def => hir_def}/src/path.rs (100%) rename crates/{ra_hir_def => hir_def}/src/path/lower.rs (100%) rename crates/{ra_hir_def => hir_def}/src/path/lower/lower_use.rs (100%) rename crates/{ra_hir_def => hir_def}/src/per_ns.rs (100%) rename crates/{ra_hir_def => hir_def}/src/resolver.rs (100%) rename crates/{ra_hir_def => hir_def}/src/src.rs (100%) rename crates/{ra_hir_def => hir_def}/src/test_db.rs (100%) rename crates/{ra_hir_def => hir_def}/src/trace.rs (100%) rename crates/{ra_hir_def => hir_def}/src/type_ref.rs (100%) rename crates/{ra_hir_def => hir_def}/src/visibility.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 768c3293d5..702bd5191d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -463,6 +463,33 @@ dependencies = [ "libc", ] +[[package]] +name = "hir_def" +version = "0.0.0" +dependencies = [ + "anymap", + "arena", + "base_db", + "cfg", + "drop_bomb", + "either", + "expect", + "fst", + "hir_expand", + "indexmap", + "itertools", + "log", + "mbe", + "once_cell", + "profile", + "rustc-hash", + "smallvec", + "stdx", + "syntax", + "test_utils", + "tt", +] + [[package]] name = "hir_expand" version = "0.0.0" @@ -1034,44 +1061,17 @@ dependencies = [ "arrayvec", "base_db", "either", + "hir_def", "hir_expand", "itertools", "log", "profile", - "ra_hir_def", "ra_hir_ty", "rustc-hash", "stdx", "syntax", ] -[[package]] -name = "ra_hir_def" -version = "0.1.0" -dependencies = [ - "anymap", - "arena", - "base_db", - "cfg", - "drop_bomb", - "either", - "expect", - "fst", - "hir_expand", - "indexmap", - "itertools", - "log", - "mbe", - "once_cell", - "profile", - "rustc-hash", - "smallvec", - "stdx", - "syntax", - "test_utils", - "tt", -] - [[package]] name = "ra_hir_ty" version = "0.1.0" @@ -1084,11 +1084,11 @@ dependencies = [ "chalk-solve", "ena", "expect", + "hir_def", "hir_expand", "itertools", "log", "profile", - "ra_hir_def", "rustc-hash", "scoped-tls", "smallvec", @@ -1236,6 +1236,7 @@ dependencies = [ "env_logger", "expect", "flycheck", + "hir_def", "itertools", "jod-thread", "log", @@ -1250,7 +1251,6 @@ dependencies = [ "profile", "project_model", "ra_hir", - "ra_hir_def", "ra_hir_ty", "ra_ide", "ra_ide_db", diff --git a/crates/ra_hir_def/Cargo.toml b/crates/hir_def/Cargo.toml similarity index 95% rename from crates/ra_hir_def/Cargo.toml rename to crates/hir_def/Cargo.toml index f93a213dfb..403bc2aff3 100644 --- a/crates/ra_hir_def/Cargo.toml +++ b/crates/hir_def/Cargo.toml @@ -1,9 +1,9 @@ [package] -edition = "2018" -name = "ra_hir_def" -version = "0.1.0" -authors = ["rust-analyzer developers"] +name = "hir_def" +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_def/src/adt.rs b/crates/hir_def/src/adt.rs similarity index 100% rename from crates/ra_hir_def/src/adt.rs rename to crates/hir_def/src/adt.rs diff --git a/crates/ra_hir_def/src/attr.rs b/crates/hir_def/src/attr.rs similarity index 100% rename from crates/ra_hir_def/src/attr.rs rename to crates/hir_def/src/attr.rs diff --git a/crates/ra_hir_def/src/body.rs b/crates/hir_def/src/body.rs similarity index 100% rename from crates/ra_hir_def/src/body.rs rename to crates/hir_def/src/body.rs diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/hir_def/src/body/lower.rs similarity index 100% rename from crates/ra_hir_def/src/body/lower.rs rename to crates/hir_def/src/body/lower.rs diff --git a/crates/ra_hir_def/src/body/scope.rs b/crates/hir_def/src/body/scope.rs similarity index 100% rename from crates/ra_hir_def/src/body/scope.rs rename to crates/hir_def/src/body/scope.rs diff --git a/crates/ra_hir_def/src/builtin_type.rs b/crates/hir_def/src/builtin_type.rs similarity index 100% rename from crates/ra_hir_def/src/builtin_type.rs rename to crates/hir_def/src/builtin_type.rs diff --git a/crates/ra_hir_def/src/child_by_source.rs b/crates/hir_def/src/child_by_source.rs similarity index 100% rename from crates/ra_hir_def/src/child_by_source.rs rename to crates/hir_def/src/child_by_source.rs diff --git a/crates/ra_hir_def/src/data.rs b/crates/hir_def/src/data.rs similarity index 100% rename from crates/ra_hir_def/src/data.rs rename to crates/hir_def/src/data.rs diff --git a/crates/ra_hir_def/src/db.rs b/crates/hir_def/src/db.rs similarity index 100% rename from crates/ra_hir_def/src/db.rs rename to crates/hir_def/src/db.rs diff --git a/crates/ra_hir_def/src/diagnostics.rs b/crates/hir_def/src/diagnostics.rs similarity index 100% rename from crates/ra_hir_def/src/diagnostics.rs rename to crates/hir_def/src/diagnostics.rs diff --git a/crates/ra_hir_def/src/docs.rs b/crates/hir_def/src/docs.rs similarity index 100% rename from crates/ra_hir_def/src/docs.rs rename to crates/hir_def/src/docs.rs diff --git a/crates/ra_hir_def/src/dyn_map.rs b/crates/hir_def/src/dyn_map.rs similarity index 100% rename from crates/ra_hir_def/src/dyn_map.rs rename to crates/hir_def/src/dyn_map.rs diff --git a/crates/ra_hir_def/src/expr.rs b/crates/hir_def/src/expr.rs similarity index 100% rename from crates/ra_hir_def/src/expr.rs rename to crates/hir_def/src/expr.rs diff --git a/crates/ra_hir_def/src/find_path.rs b/crates/hir_def/src/find_path.rs similarity index 100% rename from crates/ra_hir_def/src/find_path.rs rename to crates/hir_def/src/find_path.rs diff --git a/crates/ra_hir_def/src/generics.rs b/crates/hir_def/src/generics.rs similarity index 100% rename from crates/ra_hir_def/src/generics.rs rename to crates/hir_def/src/generics.rs diff --git a/crates/ra_hir_def/src/import_map.rs b/crates/hir_def/src/import_map.rs similarity index 100% rename from crates/ra_hir_def/src/import_map.rs rename to crates/hir_def/src/import_map.rs diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/hir_def/src/item_scope.rs similarity index 100% rename from crates/ra_hir_def/src/item_scope.rs rename to crates/hir_def/src/item_scope.rs diff --git a/crates/ra_hir_def/src/item_tree.rs b/crates/hir_def/src/item_tree.rs similarity index 100% rename from crates/ra_hir_def/src/item_tree.rs rename to crates/hir_def/src/item_tree.rs diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs similarity index 100% rename from crates/ra_hir_def/src/item_tree/lower.rs rename to crates/hir_def/src/item_tree/lower.rs diff --git a/crates/ra_hir_def/src/item_tree/tests.rs b/crates/hir_def/src/item_tree/tests.rs similarity index 97% rename from crates/ra_hir_def/src/item_tree/tests.rs rename to crates/hir_def/src/item_tree/tests.rs index 2f62eddcba..9c5bf72bd5 100644 --- a/crates/ra_hir_def/src/item_tree/tests.rs +++ b/crates/hir_def/src/item_tree/tests.rs @@ -246,13 +246,13 @@ fn smoke() { #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct0"))] }, input: None }]) }] Struct { name: Name(Text("Struct0")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(1), fields: Unit, ast_id: FileAstId::(3), kind: Unit } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct1"))] }, input: None }]) }] - Struct { name: Name(Text("Struct1")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(2), fields: Tuple(IdRange::(0..1)), ast_id: FileAstId::(4), kind: Tuple } + Struct { name: Name(Text("Struct1")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(2), fields: Tuple(IdRange::(0..1)), ast_id: FileAstId::(4), kind: Tuple } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct2"))] }, input: None }]) }] - Struct { name: Name(Text("Struct2")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(3), fields: Record(IdRange::(1..2)), ast_id: FileAstId::(5), kind: Record } + Struct { name: Name(Text("Struct2")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(3), fields: Record(IdRange::(1..2)), ast_id: FileAstId::(5), kind: Record } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("en"))] }, input: None }]) }] - Enum { name: Name(Text("En")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), variants: IdRange::(0..1), ast_id: FileAstId::(6) } + Enum { name: Name(Text("En")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), variants: IdRange::(0..1), ast_id: FileAstId::(6) } #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("un"))] }, input: None }]) }] - Union { name: Name(Text("Un")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), fields: Record(IdRange::(3..4)), ast_id: FileAstId::(7) } + Union { name: Name(Text("Un")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), fields: Record(IdRange::(3..4)), ast_id: FileAstId::(7) } "##]], ); } diff --git a/crates/ra_hir_def/src/keys.rs b/crates/hir_def/src/keys.rs similarity index 100% rename from crates/ra_hir_def/src/keys.rs rename to crates/hir_def/src/keys.rs diff --git a/crates/ra_hir_def/src/lang_item.rs b/crates/hir_def/src/lang_item.rs similarity index 100% rename from crates/ra_hir_def/src/lang_item.rs rename to crates/hir_def/src/lang_item.rs diff --git a/crates/ra_hir_def/src/lib.rs b/crates/hir_def/src/lib.rs similarity index 100% rename from crates/ra_hir_def/src/lib.rs rename to crates/hir_def/src/lib.rs diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/hir_def/src/nameres.rs similarity index 100% rename from crates/ra_hir_def/src/nameres.rs rename to crates/hir_def/src/nameres.rs diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs similarity index 100% rename from crates/ra_hir_def/src/nameres/collector.rs rename to crates/hir_def/src/nameres/collector.rs diff --git a/crates/ra_hir_def/src/nameres/mod_resolution.rs b/crates/hir_def/src/nameres/mod_resolution.rs similarity index 100% rename from crates/ra_hir_def/src/nameres/mod_resolution.rs rename to crates/hir_def/src/nameres/mod_resolution.rs diff --git a/crates/ra_hir_def/src/nameres/path_resolution.rs b/crates/hir_def/src/nameres/path_resolution.rs similarity index 100% rename from crates/ra_hir_def/src/nameres/path_resolution.rs rename to crates/hir_def/src/nameres/path_resolution.rs diff --git a/crates/ra_hir_def/src/nameres/tests.rs b/crates/hir_def/src/nameres/tests.rs similarity index 100% rename from crates/ra_hir_def/src/nameres/tests.rs rename to crates/hir_def/src/nameres/tests.rs diff --git a/crates/ra_hir_def/src/nameres/tests/globs.rs b/crates/hir_def/src/nameres/tests/globs.rs similarity index 100% rename from crates/ra_hir_def/src/nameres/tests/globs.rs rename to crates/hir_def/src/nameres/tests/globs.rs diff --git a/crates/ra_hir_def/src/nameres/tests/incremental.rs b/crates/hir_def/src/nameres/tests/incremental.rs similarity index 100% rename from crates/ra_hir_def/src/nameres/tests/incremental.rs rename to crates/hir_def/src/nameres/tests/incremental.rs diff --git a/crates/ra_hir_def/src/nameres/tests/macros.rs b/crates/hir_def/src/nameres/tests/macros.rs similarity index 100% rename from crates/ra_hir_def/src/nameres/tests/macros.rs rename to crates/hir_def/src/nameres/tests/macros.rs diff --git a/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs b/crates/hir_def/src/nameres/tests/mod_resolution.rs similarity index 100% rename from crates/ra_hir_def/src/nameres/tests/mod_resolution.rs rename to crates/hir_def/src/nameres/tests/mod_resolution.rs diff --git a/crates/ra_hir_def/src/nameres/tests/primitives.rs b/crates/hir_def/src/nameres/tests/primitives.rs similarity index 100% rename from crates/ra_hir_def/src/nameres/tests/primitives.rs rename to crates/hir_def/src/nameres/tests/primitives.rs diff --git a/crates/ra_hir_def/src/path.rs b/crates/hir_def/src/path.rs similarity index 100% rename from crates/ra_hir_def/src/path.rs rename to crates/hir_def/src/path.rs diff --git a/crates/ra_hir_def/src/path/lower.rs b/crates/hir_def/src/path/lower.rs similarity index 100% rename from crates/ra_hir_def/src/path/lower.rs rename to crates/hir_def/src/path/lower.rs diff --git a/crates/ra_hir_def/src/path/lower/lower_use.rs b/crates/hir_def/src/path/lower/lower_use.rs similarity index 100% rename from crates/ra_hir_def/src/path/lower/lower_use.rs rename to crates/hir_def/src/path/lower/lower_use.rs diff --git a/crates/ra_hir_def/src/per_ns.rs b/crates/hir_def/src/per_ns.rs similarity index 100% rename from crates/ra_hir_def/src/per_ns.rs rename to crates/hir_def/src/per_ns.rs diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/hir_def/src/resolver.rs similarity index 100% rename from crates/ra_hir_def/src/resolver.rs rename to crates/hir_def/src/resolver.rs diff --git a/crates/ra_hir_def/src/src.rs b/crates/hir_def/src/src.rs similarity index 100% rename from crates/ra_hir_def/src/src.rs rename to crates/hir_def/src/src.rs diff --git a/crates/ra_hir_def/src/test_db.rs b/crates/hir_def/src/test_db.rs similarity index 100% rename from crates/ra_hir_def/src/test_db.rs rename to crates/hir_def/src/test_db.rs diff --git a/crates/ra_hir_def/src/trace.rs b/crates/hir_def/src/trace.rs similarity index 100% rename from crates/ra_hir_def/src/trace.rs rename to crates/hir_def/src/trace.rs diff --git a/crates/ra_hir_def/src/type_ref.rs b/crates/hir_def/src/type_ref.rs similarity index 100% rename from crates/ra_hir_def/src/type_ref.rs rename to crates/hir_def/src/type_ref.rs diff --git a/crates/ra_hir_def/src/visibility.rs b/crates/hir_def/src/visibility.rs similarity index 100% rename from crates/ra_hir_def/src/visibility.rs rename to crates/hir_def/src/visibility.rs diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml index 0ec1589c19..edca5dc6f8 100644 --- a/crates/ra_hir/Cargo.toml +++ b/crates/ra_hir/Cargo.toml @@ -21,5 +21,5 @@ syntax = { path = "../syntax" } base_db = { path = "../base_db" } profile = { path = "../profile" } hir_expand = { path = "../hir_expand" } -hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } +hir_def = { path = "../hir_def" } hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml index 75f04f9dd0..d430b08ca7 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/ra_hir_ty/Cargo.toml @@ -18,7 +18,7 @@ rustc-hash = "1.1.0" stdx = { path = "../stdx" } -hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } +hir_def = { path = "../hir_def" } hir_expand = { path = "../hir_expand" } arena = { path = "../arena" } base_db = { path = "../base_db" } diff --git a/crates/ra_hir_ty/src/tests/simple.rs b/crates/ra_hir_ty/src/tests/simple.rs index 5a7cf9455b..59eb59d5fa 100644 --- a/crates/ra_hir_ty/src/tests/simple.rs +++ b/crates/ra_hir_ty/src/tests/simple.rs @@ -1776,8 +1776,8 @@ fn main() { ); } -// This test is actually testing the shadowing behavior within ra_hir_def. It -// lives here because the testing infrastructure in ra_hir_def isn't currently +// This test is actually testing the shadowing behavior within hir_def. It +// lives here because the testing infrastructure in hir_def isn't currently // capable of asserting the necessary conditions. #[test] fn should_be_shadowing_imports() { diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml index 210d9e9c88..0dee719de5 100644 --- a/crates/rust-analyzer/Cargo.toml +++ b/crates/rust-analyzer/Cargo.toml @@ -50,7 +50,7 @@ base_db = { path = "../base_db" } ra_ide_db = { path = "../ra_ide_db" } ra_ssr = { path = "../ra_ssr" } hir = { path = "../ra_hir", package = "ra_hir" } -hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } +hir_def = { path = "../hir_def" } hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" } proc_macro_srv = { path = "../proc_macro_srv" } diff --git a/crates/rust-analyzer/src/diagnostics/to_proto.rs b/crates/rust-analyzer/src/diagnostics/to_proto.rs index 97f3313521..6d54081560 100644 --- a/crates/rust-analyzer/src/diagnostics/to_proto.rs +++ b/crates/rust-analyzer/src/diagnostics/to_proto.rs @@ -1116,7 +1116,7 @@ mod tests { fn macro_compiler_error() { check( r##"{ - "rendered": "error: Please register your known path in the path module\n --> crates/ra_hir_def/src/path.rs:265:9\n |\n265 | compile_error!(\"Please register your known path in the path module\")\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n | \n ::: crates/ra_hir_def/src/data.rs:80:16\n |\n80 | let path = path![std::future::Future];\n | -------------------------- in this macro invocation\n\n", + "rendered": "error: Please register your known path in the path module\n --> crates/hir_def/src/path.rs:265:9\n |\n265 | compile_error!(\"Please register your known path in the path module\")\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n | \n ::: crates/hir_def/src/data.rs:80:16\n |\n80 | let path = path![std::future::Future];\n | -------------------------- in this macro invocation\n\n", "children": [], "code": null, "level": "error", @@ -1134,7 +1134,7 @@ mod tests { "column_end": 2, "column_start": 1, "expansion": null, - "file_name": "crates/ra_hir_def/src/path.rs", + "file_name": "crates/hir_def/src/path.rs", "is_primary": false, "label": null, "line_end": 267, @@ -1227,7 +1227,7 @@ mod tests { "column_end": 2, "column_start": 1, "expansion": null, - "file_name": "crates/ra_hir_def/src/path.rs", + "file_name": "crates/hir_def/src/path.rs", "is_primary": false, "label": null, "line_end": 277, @@ -1284,7 +1284,7 @@ mod tests { "column_end": 42, "column_start": 16, "expansion": null, - "file_name": "crates/ra_hir_def/src/data.rs", + "file_name": "crates/hir_def/src/data.rs", "is_primary": false, "label": null, "line_end": 80, @@ -1300,7 +1300,7 @@ mod tests { ] } }, - "file_name": "crates/ra_hir_def/src/path.rs", + "file_name": "crates/hir_def/src/path.rs", "is_primary": false, "label": null, "line_end": 272, @@ -1316,7 +1316,7 @@ mod tests { ] } }, - "file_name": "crates/ra_hir_def/src/path.rs", + "file_name": "crates/hir_def/src/path.rs", "is_primary": true, "label": null, "line_end": 265, diff --git a/crates/rust-analyzer/test_data/macro_compiler_error.txt b/crates/rust-analyzer/test_data/macro_compiler_error.txt index f695db73ce..89dae7d5a6 100644 --- a/crates/rust-analyzer/test_data/macro_compiler_error.txt +++ b/crates/rust-analyzer/test_data/macro_compiler_error.txt @@ -1,6 +1,6 @@ [ MappedRustDiagnostic { - url: "file:///test/crates/ra_hir_def/src/data.rs", + url: "file:///test/crates/hir_def/src/data.rs", diagnostic: Diagnostic { range: Range { start: Position { @@ -24,7 +24,7 @@ [ DiagnosticRelatedInformation { location: Location { - uri: "file:///test/crates/ra_hir_def/src/path.rs", + uri: "file:///test/crates/hir_def/src/path.rs", range: Range { start: Position { line: 264,