aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/body/lower.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-29 23:48:04 +0100
committerGitHub <[email protected]>2020-07-29 23:48:04 +0100
commit9da454bcc2386e2782b71a9756b77a7763fd544b (patch)
tree72dc1cdc67d1cef8024b88cc05955ade68d917e2 /crates/ra_hir_def/src/body/lower.rs
parent4567ae575e15cdb9af39b68b1490c062762ec39e (diff)
parentede5d17b0409f9d5a209aaf16508262dbd2a4489 (diff)
Merge #5578
5578: Rename ModuleItem -> Item r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
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))