diff options
Diffstat (limited to 'crates/ra_hir_def/src/body')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index b61f924b7..853e17bae 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -26,7 +26,7 @@ use crate::{ | |||
26 | path::Path, | 26 | path::Path, |
27 | type_ref::{Mutability, TypeRef}, | 27 | type_ref::{Mutability, TypeRef}, |
28 | ConstLoc, ContainerId, DefWithBodyId, EnumLoc, FunctionLoc, Intern, ModuleDefId, StaticLoc, | 28 | ConstLoc, ContainerId, DefWithBodyId, EnumLoc, FunctionLoc, Intern, ModuleDefId, StaticLoc, |
29 | StructLoc, TypeAliasLoc, UnionLoc, | 29 | StructLoc, TraitLoc, TypeAliasLoc, UnionLoc, |
30 | }; | 30 | }; |
31 | 31 | ||
32 | pub(super) fn lower( | 32 | pub(super) fn lower( |
@@ -522,7 +522,14 @@ where | |||
522 | let ast_id = self.expander.ast_id(&def); | 522 | let ast_id = self.expander.ast_id(&def); |
523 | UnionLoc { container, ast_id }.intern(self.db).into() | 523 | UnionLoc { container, ast_id }.intern(self.db).into() |
524 | } | 524 | } |
525 | _ => continue, | 525 | ast::ModuleItem::TraitDef(def) => { |
526 | let ast_id = self.expander.ast_id(&def); | ||
527 | TraitLoc { container, ast_id }.intern(self.db).into() | ||
528 | } | ||
529 | ast::ModuleItem::ImplBlock(_) | ||
530 | | ast::ModuleItem::UseItem(_) | ||
531 | | ast::ModuleItem::ExternCrateItem(_) | ||
532 | | ast::ModuleItem::Module(_) => continue, | ||
526 | }; | 533 | }; |
527 | self.body.defs.push(def) | 534 | self.body.defs.push(def) |
528 | } | 535 | } |