aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def')
-rw-r--r--crates/hir_def/Cargo.toml21
-rw-r--r--crates/hir_def/src/item_tree/lower.rs4
-rw-r--r--crates/hir_def/src/nameres/tests.rs2
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]
2name = "hir_def" 2name = "hir_def"
3version = "0.0.0" 3version = "0.0.0"
4description = "TBD"
4license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
5authors = ["rust-analyzer developers"] 6authors = ["rust-analyzer developers"]
6edition = "2018" 7edition = "2018"
@@ -20,16 +21,16 @@ itertools = "0.9.0"
20indexmap = "1.4.0" 21indexmap = "1.4.0"
21smallvec = "1.4.0" 22smallvec = "1.4.0"
22 23
23stdx = { path = "../stdx" } 24stdx = { path = "../stdx", version = "0.0.0" }
24arena = { path = "../arena" } 25arena = { path = "../arena", version = "0.0.0" }
25base_db = { path = "../base_db" } 26base_db = { path = "../base_db", version = "0.0.0" }
26syntax = { path = "../syntax" } 27syntax = { path = "../syntax", version = "0.0.0" }
27profile = { path = "../profile" } 28profile = { path = "../profile", version = "0.0.0" }
28hir_expand = { path = "../hir_expand" } 29hir_expand = { path = "../hir_expand", version = "0.0.0" }
29test_utils = { path = "../test_utils" } 30test_utils = { path = "../test_utils", version = "0.0.0" }
30mbe = { path = "../mbe" } 31mbe = { path = "../mbe", version = "0.0.0" }
31cfg = { path = "../cfg" } 32cfg = { path = "../cfg", version = "0.0.0" }
32tt = { path = "../tt" } 33tt = { path = "../tt", version = "0.0.0" }
33 34
34[dev-dependencies] 35[dev-dependencies]
35expect-test = "0.1" 36expect-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 }
46enum E { V } 46enum E { V }
47 47
48extern { 48extern {
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 "#]],