aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/body
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-20 11:29:25 +0000
committerAleksey Kladov <[email protected]>2019-12-20 11:29:25 +0000
commitf42697e54b9d0a040011cb04c266d51710e249f1 (patch)
treed2016e6e3ce596e6a4b3e44f4894b5a411c62789 /crates/ra_hir_def/src/body
parentfe1b160dcfdeb3f582ccae1440c9580ade0beb39 (diff)
Support for nested traits
Diffstat (limited to 'crates/ra_hir_def/src/body')
-rw-r--r--crates/ra_hir_def/src/body/lower.rs11
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
32pub(super) fn lower( 32pub(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 }