aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/item_tree/lower.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/item_tree/lower.rs')
-rw-r--r--crates/hir_def/src/item_tree/lower.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/hir_def/src/item_tree/lower.rs b/crates/hir_def/src/item_tree/lower.rs
index 6a503d785..da62e1297 100644
--- a/crates/hir_def/src/item_tree/lower.rs
+++ b/crates/hir_def/src/item_tree/lower.rs
@@ -364,6 +364,7 @@ impl Ctx {
364 generic_params, 364 generic_params,
365 type_ref, 365 type_ref,
366 ast_id, 366 ast_id,
367 is_extern: false,
367 }; 368 };
368 Some(id(self.data().type_aliases.alloc(res))) 369 Some(id(self.data().type_aliases.alloc(res)))
369 } 370 }
@@ -482,7 +483,7 @@ impl Ctx {
482 ModPath::expand_use_item( 483 ModPath::expand_use_item(
483 InFile::new(self.file, use_item.clone()), 484 InFile::new(self.file, use_item.clone()),
484 &self.hygiene, 485 &self.hygiene,
485 |path, _tree, is_glob, alias| { 486 |path, _use_tree, is_glob, alias| {
486 imports.push(id(tree.imports.alloc(Import { 487 imports.push(id(tree.imports.alloc(Import {
487 path, 488 path,
488 alias, 489 alias,
@@ -490,6 +491,7 @@ impl Ctx {
490 is_glob, 491 is_glob,
491 is_prelude, 492 is_prelude,
492 ast_id, 493 ast_id,
494 index: imports.len(),
493 }))); 495 })));
494 }, 496 },
495 ); 497 );
@@ -558,8 +560,9 @@ impl Ctx {
558 statik.into() 560 statik.into()
559 } 561 }
560 ast::ExternItem::TypeAlias(ty) => { 562 ast::ExternItem::TypeAlias(ty) => {
561 let id = self.lower_type_alias(&ty)?; 563 let foreign_ty = self.lower_type_alias(&ty)?;
562 id.into() 564 self.data().type_aliases[foreign_ty.index].is_extern = true;
565 foreign_ty.into()
563 } 566 }
564 ast::ExternItem::MacroCall(_) => return None, 567 ast::ExternItem::MacroCall(_) => return None,
565 }; 568 };