aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/body/lower.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/body/lower.rs')
-rw-r--r--crates/ra_hir_def/src/body/lower.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index 0d3f946df..b61f924b7 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -25,7 +25,8 @@ use crate::{
25 path::GenericArgs, 25 path::GenericArgs,
26 path::Path, 26 path::Path,
27 type_ref::{Mutability, TypeRef}, 27 type_ref::{Mutability, TypeRef},
28 ContainerId, DefWithBodyId, EnumLoc, FunctionLoc, Intern, ModuleDefId, StructLoc, UnionLoc, 28 ConstLoc, ContainerId, DefWithBodyId, EnumLoc, FunctionLoc, Intern, ModuleDefId, StaticLoc,
29 StructLoc, TypeAliasLoc, UnionLoc,
29}; 30};
30 31
31pub(super) fn lower( 32pub(super) fn lower(
@@ -497,6 +498,18 @@ where
497 let ast_id = self.expander.ast_id(&def); 498 let ast_id = self.expander.ast_id(&def);
498 FunctionLoc { container: container.into(), ast_id }.intern(self.db).into() 499 FunctionLoc { container: container.into(), ast_id }.intern(self.db).into()
499 } 500 }
501 ast::ModuleItem::TypeAliasDef(def) => {
502 let ast_id = self.expander.ast_id(&def);
503 TypeAliasLoc { container: container.into(), ast_id }.intern(self.db).into()
504 }
505 ast::ModuleItem::ConstDef(def) => {
506 let ast_id = self.expander.ast_id(&def);
507 ConstLoc { container: container.into(), ast_id }.intern(self.db).into()
508 }
509 ast::ModuleItem::StaticDef(def) => {
510 let ast_id = self.expander.ast_id(&def);
511 StaticLoc { container, ast_id }.intern(self.db).into()
512 }
500 ast::ModuleItem::StructDef(def) => { 513 ast::ModuleItem::StructDef(def) => {
501 let ast_id = self.expander.ast_id(&def); 514 let ast_id = self.expander.ast_id(&def);
502 StructLoc { container, ast_id }.intern(self.db).into() 515 StructLoc { container, ast_id }.intern(self.db).into()