diff options
author | Zac Pullar-Strecker <[email protected]> | 2020-08-25 05:44:36 +0100 |
---|---|---|
committer | Zac Pullar-Strecker <[email protected]> | 2020-08-25 05:44:36 +0100 |
commit | b835f06cecd2189cb32a431fdb85245fbf53032a (patch) | |
tree | 8bb4ba65f4922e9cca571a7d4a7fa17d047ae779 /crates/hir_def | |
parent | 452afaebe188251cd4403e56999bf8b58de4fba9 (diff) | |
parent | ef9cea945d5767e7c60d5931a7649a73caea23ad (diff) |
Merge remote-tracking branch 'upstream/master' into 503-hover-doc-links
Diffstat (limited to 'crates/hir_def')
-rw-r--r-- | crates/hir_def/Cargo.toml | 21 | ||||
-rw-r--r-- | crates/hir_def/src/item_tree/lower.rs | 4 | ||||
-rw-r--r-- | crates/hir_def/src/nameres/tests.rs | 2 |
3 files changed, 17 insertions, 10 deletions
diff --git a/crates/hir_def/Cargo.toml b/crates/hir_def/Cargo.toml index 57745322f..011e4612c 100644 --- a/crates/hir_def/Cargo.toml +++ b/crates/hir_def/Cargo.toml | |||
@@ -1,6 +1,7 @@ | |||
1 | [package] | 1 | [package] |
2 | name = "hir_def" | 2 | name = "hir_def" |
3 | version = "0.0.0" | 3 | version = "0.0.0" |
4 | description = "TBD" | ||
4 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
5 | authors = ["rust-analyzer developers"] | 6 | authors = ["rust-analyzer developers"] |
6 | edition = "2018" | 7 | edition = "2018" |
@@ -20,16 +21,16 @@ itertools = "0.9.0" | |||
20 | indexmap = "1.4.0" | 21 | indexmap = "1.4.0" |
21 | smallvec = "1.4.0" | 22 | smallvec = "1.4.0" |
22 | 23 | ||
23 | stdx = { path = "../stdx" } | 24 | stdx = { path = "../stdx", version = "0.0.0" } |
24 | arena = { path = "../arena" } | 25 | arena = { path = "../arena", version = "0.0.0" } |
25 | base_db = { path = "../base_db" } | 26 | base_db = { path = "../base_db", version = "0.0.0" } |
26 | syntax = { path = "../syntax" } | 27 | syntax = { path = "../syntax", version = "0.0.0" } |
27 | profile = { path = "../profile" } | 28 | profile = { path = "../profile", version = "0.0.0" } |
28 | hir_expand = { path = "../hir_expand" } | 29 | hir_expand = { path = "../hir_expand", version = "0.0.0" } |
29 | test_utils = { path = "../test_utils" } | 30 | test_utils = { path = "../test_utils", version = "0.0.0" } |
30 | mbe = { path = "../mbe" } | 31 | mbe = { path = "../mbe", version = "0.0.0" } |
31 | cfg = { path = "../cfg" } | 32 | cfg = { path = "../cfg", version = "0.0.0" } |
32 | tt = { path = "../tt" } | 33 | tt = { path = "../tt", version = "0.0.0" } |
33 | 34 | ||
34 | [dev-dependencies] | 35 | [dev-dependencies] |
35 | expect-test = "0.1" | 36 | expect-test = "0.1" |
diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs index 391ab5d39..6a503d785 100644 --- a/crates/hir_def/src/item_tree/lower.rs +++ b/crates/hir_def/src/item_tree/lower.rs | |||
@@ -557,6 +557,10 @@ impl Ctx { | |||
557 | let statik = self.lower_static(&ast)?; | 557 | let statik = self.lower_static(&ast)?; |
558 | statik.into() | 558 | statik.into() |
559 | } | 559 | } |
560 | ast::ExternItem::TypeAlias(ty) => { | ||
561 | let id = self.lower_type_alias(&ty)?; | ||
562 | id.into() | ||
563 | } | ||
560 | ast::ExternItem::MacroCall(_) => return None, | 564 | ast::ExternItem::MacroCall(_) => return None, |
561 | }; | 565 | }; |
562 | self.add_attrs(id.into(), attrs); | 566 | self.add_attrs(id.into(), attrs); |
diff --git a/crates/hir_def/src/nameres/tests.rs b/crates/hir_def/src/nameres/tests.rs index 8aaf7a158..5ca30dac9 100644 --- a/crates/hir_def/src/nameres/tests.rs +++ b/crates/hir_def/src/nameres/tests.rs | |||
@@ -46,6 +46,7 @@ union U { to_be: bool, not_to_be: u8 } | |||
46 | enum E { V } | 46 | enum E { V } |
47 | 47 | ||
48 | extern { | 48 | extern { |
49 | type Ext; | ||
49 | static EXT: u8; | 50 | static EXT: u8; |
50 | fn ext(); | 51 | fn ext(); |
51 | } | 52 | } |
@@ -65,6 +66,7 @@ extern { | |||
65 | Baz: t v | 66 | Baz: t v |
66 | E: t | 67 | E: t |
67 | EXT: v | 68 | EXT: v |
69 | Ext: t | ||
68 | U: t | 70 | U: t |
69 | ext: v | 71 | ext: v |
70 | "#]], | 72 | "#]], |