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", "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]] [[package]]
name = "hir_expand" name = "hir_expand"
version = "0.0.0" version = "0.0.0"
@ -1034,44 +1061,17 @@ dependencies = [
"arrayvec", "arrayvec",
"base_db", "base_db",
"either", "either",
"hir_def",
"hir_expand", "hir_expand",
"itertools", "itertools",
"log", "log",
"profile", "profile",
"ra_hir_def",
"ra_hir_ty", "ra_hir_ty",
"rustc-hash", "rustc-hash",
"stdx", "stdx",
"syntax", "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]] [[package]]
name = "ra_hir_ty" name = "ra_hir_ty"
version = "0.1.0" version = "0.1.0"
@ -1084,11 +1084,11 @@ dependencies = [
"chalk-solve", "chalk-solve",
"ena", "ena",
"expect", "expect",
"hir_def",
"hir_expand", "hir_expand",
"itertools", "itertools",
"log", "log",
"profile", "profile",
"ra_hir_def",
"rustc-hash", "rustc-hash",
"scoped-tls", "scoped-tls",
"smallvec", "smallvec",
@ -1236,6 +1236,7 @@ dependencies = [
"env_logger", "env_logger",
"expect", "expect",
"flycheck", "flycheck",
"hir_def",
"itertools", "itertools",
"jod-thread", "jod-thread",
"log", "log",
@ -1250,7 +1251,6 @@ dependencies = [
"profile", "profile",
"project_model", "project_model",
"ra_hir", "ra_hir",
"ra_hir_def",
"ra_hir_ty", "ra_hir_ty",
"ra_ide", "ra_ide",
"ra_ide_db", "ra_ide_db",

View file

@ -1,9 +1,9 @@
[package] [package]
edition = "2018" name = "hir_def"
name = "ra_hir_def" version = "0.0.0"
version = "0.1.0"
authors = ["rust-analyzer developers"]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
authors = ["rust-analyzer developers"]
edition = "2018"
[lib] [lib]
doctest = false doctest = false

View file

@ -246,13 +246,13 @@ fn smoke() {
#[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("struct0"))] }, input: None }]) }] #[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 } 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 }]) }] #[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 }]) }] #[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 }]) }] #[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 }]) }] #[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" } base_db = { path = "../base_db" }
profile = { path = "../profile" } profile = { path = "../profile" }
hir_expand = { path = "../hir_expand" } 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" } hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" }

View file

@ -18,7 +18,7 @@ rustc-hash = "1.1.0"
stdx = { path = "../stdx" } stdx = { path = "../stdx" }
hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } hir_def = { path = "../hir_def" }
hir_expand = { path = "../hir_expand" } hir_expand = { path = "../hir_expand" }
arena = { path = "../arena" } arena = { path = "../arena" }
base_db = { path = "../base_db" } 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 // This test is actually testing the shadowing behavior within hir_def. It
// lives here because the testing infrastructure in ra_hir_def isn't currently // lives here because the testing infrastructure in hir_def isn't currently
// capable of asserting the necessary conditions. // capable of asserting the necessary conditions.
#[test] #[test]
fn should_be_shadowing_imports() { fn should_be_shadowing_imports() {

View file

@ -50,7 +50,7 @@ base_db = { path = "../base_db" }
ra_ide_db = { path = "../ra_ide_db" } ra_ide_db = { path = "../ra_ide_db" }
ra_ssr = { path = "../ra_ssr" } ra_ssr = { path = "../ra_ssr" }
hir = { path = "../ra_hir", package = "ra_hir" } 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" } hir_ty = { path = "../ra_hir_ty", package = "ra_hir_ty" }
proc_macro_srv = { path = "../proc_macro_srv" } proc_macro_srv = { path = "../proc_macro_srv" }

View file

@ -1116,7 +1116,7 @@ mod tests {
fn macro_compiler_error() { fn macro_compiler_error() {
check( check(
r##"{ 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": [], "children": [],
"code": null, "code": null,
"level": "error", "level": "error",
@ -1134,7 +1134,7 @@ mod tests {
"column_end": 2, "column_end": 2,
"column_start": 1, "column_start": 1,
"expansion": null, "expansion": null,
"file_name": "crates/ra_hir_def/src/path.rs", "file_name": "crates/hir_def/src/path.rs",
"is_primary": false, "is_primary": false,
"label": null, "label": null,
"line_end": 267, "line_end": 267,
@ -1227,7 +1227,7 @@ mod tests {
"column_end": 2, "column_end": 2,
"column_start": 1, "column_start": 1,
"expansion": null, "expansion": null,
"file_name": "crates/ra_hir_def/src/path.rs", "file_name": "crates/hir_def/src/path.rs",
"is_primary": false, "is_primary": false,
"label": null, "label": null,
"line_end": 277, "line_end": 277,
@ -1284,7 +1284,7 @@ mod tests {
"column_end": 42, "column_end": 42,
"column_start": 16, "column_start": 16,
"expansion": null, "expansion": null,
"file_name": "crates/ra_hir_def/src/data.rs", "file_name": "crates/hir_def/src/data.rs",
"is_primary": false, "is_primary": false,
"label": null, "label": null,
"line_end": 80, "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, "is_primary": false,
"label": null, "label": null,
"line_end": 272, "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, "is_primary": true,
"label": null, "label": null,
"line_end": 265, "line_end": 265,

View file

@ -1,6 +1,6 @@
[ [
MappedRustDiagnostic { MappedRustDiagnostic {
url: "file:///test/crates/ra_hir_def/src/data.rs", url: "file:///test/crates/hir_def/src/data.rs",
diagnostic: Diagnostic { diagnostic: Diagnostic {
range: Range { range: Range {
start: Position { start: Position {
@ -24,7 +24,7 @@
[ [
DiagnosticRelatedInformation { DiagnosticRelatedInformation {
location: Location { location: Location {
uri: "file:///test/crates/ra_hir_def/src/path.rs", uri: "file:///test/crates/hir_def/src/path.rs",
range: Range { range: Range {
start: Position { start: Position {
line: 264, line: 264,