Rename ra_hir_def -> hir_def

This commit is contained in:
Aleksey Kladov 2020-08-13 16:28:27 +02:00
parent b7aa4898e0
commit b28c54a2c2
51 changed files with 51 additions and 51 deletions

60
Cargo.lock generated
View file

@ -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",

View file

@ -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

View file

@ -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::<syntax::ast::generated::nodes::Struct>(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::<ra_hir_def::item_tree::Field>(0..1)), ast_id: FileAstId::<syntax::ast::generated::nodes::Struct>(4), kind: Tuple }
Struct { name: Name(Text("Struct1")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(2), fields: Tuple(IdRange::<hir_def::item_tree::Field>(0..1)), ast_id: FileAstId::<syntax::ast::generated::nodes::Struct>(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::<ra_hir_def::item_tree::Field>(1..2)), ast_id: FileAstId::<syntax::ast::generated::nodes::Struct>(5), kind: Record }
Struct { name: Name(Text("Struct2")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(3), fields: Record(IdRange::<hir_def::item_tree::Field>(1..2)), ast_id: FileAstId::<syntax::ast::generated::nodes::Struct>(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::<ra_hir_def::item_tree::Variant>(0..1), ast_id: FileAstId::<syntax::ast::generated::nodes::Enum>(6) }
Enum { name: Name(Text("En")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), variants: IdRange::<hir_def::item_tree::Variant>(0..1), ast_id: FileAstId::<syntax::ast::generated::nodes::Enum>(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::<ra_hir_def::item_tree::Field>(3..4)), ast_id: FileAstId::<syntax::ast::generated::nodes::Union>(7) }
Union { name: Name(Text("Un")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(4294967295), fields: Record(IdRange::<hir_def::item_tree::Field>(3..4)), ast_id: FileAstId::<syntax::ast::generated::nodes::Union>(7) }
"##]],
);
}

View file

@ -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" }

View file

@ -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" }

View file

@ -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() {

View file

@ -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" }

View file

@ -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,

View file

@ -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,