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.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index c6bc85e2f..c33b645f3 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -627,53 +627,53 @@ impl ExprCollector<'_> {
627 .items() 627 .items()
628 .filter_map(|item| { 628 .filter_map(|item| {
629 let (def, name): (ModuleDefId, Option<ast::Name>) = match item { 629 let (def, name): (ModuleDefId, Option<ast::Name>) = match item {
630 ast::ModuleItem::FnDef(def) => { 630 ast::Item::FnDef(def) => {
631 let id = self.find_inner_item(&def)?; 631 let id = self.find_inner_item(&def)?;
632 ( 632 (
633 FunctionLoc { container: container.into(), id }.intern(self.db).into(), 633 FunctionLoc { container: container.into(), id }.intern(self.db).into(),
634 def.name(), 634 def.name(),
635 ) 635 )
636 } 636 }
637 ast::ModuleItem::TypeAliasDef(def) => { 637 ast::Item::TypeAliasDef(def) => {
638 let id = self.find_inner_item(&def)?; 638 let id = self.find_inner_item(&def)?;
639 ( 639 (
640 TypeAliasLoc { container: container.into(), id }.intern(self.db).into(), 640 TypeAliasLoc { container: container.into(), id }.intern(self.db).into(),
641 def.name(), 641 def.name(),
642 ) 642 )
643 } 643 }
644 ast::ModuleItem::ConstDef(def) => { 644 ast::Item::ConstDef(def) => {
645 let id = self.find_inner_item(&def)?; 645 let id = self.find_inner_item(&def)?;
646 ( 646 (
647 ConstLoc { container: container.into(), id }.intern(self.db).into(), 647 ConstLoc { container: container.into(), id }.intern(self.db).into(),
648 def.name(), 648 def.name(),
649 ) 649 )
650 } 650 }
651 ast::ModuleItem::StaticDef(def) => { 651 ast::Item::StaticDef(def) => {
652 let id = self.find_inner_item(&def)?; 652 let id = self.find_inner_item(&def)?;
653 (StaticLoc { container, id }.intern(self.db).into(), def.name()) 653 (StaticLoc { container, id }.intern(self.db).into(), def.name())
654 } 654 }
655 ast::ModuleItem::StructDef(def) => { 655 ast::Item::StructDef(def) => {
656 let id = self.find_inner_item(&def)?; 656 let id = self.find_inner_item(&def)?;
657 (StructLoc { container, id }.intern(self.db).into(), def.name()) 657 (StructLoc { container, id }.intern(self.db).into(), def.name())
658 } 658 }
659 ast::ModuleItem::EnumDef(def) => { 659 ast::Item::EnumDef(def) => {
660 let id = self.find_inner_item(&def)?; 660 let id = self.find_inner_item(&def)?;
661 (EnumLoc { container, id }.intern(self.db).into(), def.name()) 661 (EnumLoc { container, id }.intern(self.db).into(), def.name())
662 } 662 }
663 ast::ModuleItem::UnionDef(def) => { 663 ast::Item::UnionDef(def) => {
664 let id = self.find_inner_item(&def)?; 664 let id = self.find_inner_item(&def)?;
665 (UnionLoc { container, id }.intern(self.db).into(), def.name()) 665 (UnionLoc { container, id }.intern(self.db).into(), def.name())
666 } 666 }
667 ast::ModuleItem::TraitDef(def) => { 667 ast::Item::TraitDef(def) => {
668 let id = self.find_inner_item(&def)?; 668 let id = self.find_inner_item(&def)?;
669 (TraitLoc { container, id }.intern(self.db).into(), def.name()) 669 (TraitLoc { container, id }.intern(self.db).into(), def.name())
670 } 670 }
671 ast::ModuleItem::ExternBlock(_) => return None, // FIXME: collect from extern blocks 671 ast::Item::ExternBlock(_) => return None, // FIXME: collect from extern blocks
672 ast::ModuleItem::ImplDef(_) 672 ast::Item::ImplDef(_)
673 | ast::ModuleItem::UseItem(_) 673 | ast::Item::UseItem(_)
674 | ast::ModuleItem::ExternCrateItem(_) 674 | ast::Item::ExternCrateItem(_)
675 | ast::ModuleItem::Module(_) 675 | ast::Item::Module(_)
676 | ast::ModuleItem::MacroCall(_) => return None, 676 | ast::Item::MacroCall(_) => return None,
677 }; 677 };
678 678
679 Some((def, name)) 679 Some((def, name))