diff options
Diffstat (limited to 'crates/ra_hir_def/src/body')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index 5c57d8bde..4a26e6397 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -379,10 +379,10 @@ impl ExprCollector<'_> { | |||
379 | let expr = e.expr().map(|e| self.collect_expr(e)); | 379 | let expr = e.expr().map(|e| self.collect_expr(e)); |
380 | self.alloc_expr(Expr::Return { expr }, syntax_ptr) | 380 | self.alloc_expr(Expr::Return { expr }, syntax_ptr) |
381 | } | 381 | } |
382 | ast::Expr::RecordLit(e) => { | 382 | ast::Expr::RecordExpr(e) => { |
383 | let path = e.path().and_then(|path| self.expander.parse_path(path)); | 383 | let path = e.path().and_then(|path| self.expander.parse_path(path)); |
384 | let mut field_ptrs = Vec::new(); | 384 | let mut field_ptrs = Vec::new(); |
385 | let record_lit = if let Some(nfl) = e.record_field_list() { | 385 | let record_lit = if let Some(nfl) = e.record_expr_field_list() { |
386 | let fields = nfl | 386 | let fields = nfl |
387 | .fields() | 387 | .fields() |
388 | .inspect(|field| field_ptrs.push(AstPtr::new(field))) | 388 | .inspect(|field| field_ptrs.push(AstPtr::new(field))) |
@@ -627,40 +627,40 @@ 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::Item::FnDef(def) => { | 630 | ast::Item::Fn(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::Item::TypeAliasDef(def) => { | 637 | ast::Item::TypeAlias(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::Item::ConstDef(def) => { | 644 | ast::Item::Const(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::Item::StaticDef(def) => { | 651 | ast::Item::Static(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::Item::StructDef(def) => { | 655 | ast::Item::Struct(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::Item::EnumDef(def) => { | 659 | ast::Item::Enum(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::Item::UnionDef(def) => { | 663 | ast::Item::Union(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 | } |