aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/expr.rs')
-rw-r--r--crates/ra_hir/src/expr.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs
index b2a237ece..cfa824458 100644
--- a/crates/ra_hir/src/expr.rs
+++ b/crates/ra_hir/src/expr.rs
@@ -671,7 +671,10 @@ impl ExprCollector {
671 } 671 }
672 ast::ExprKind::FieldExpr(e) => { 672 ast::ExprKind::FieldExpr(e) => {
673 let expr = self.collect_expr_opt(e.expr()); 673 let expr = self.collect_expr_opt(e.expr());
674 let name = e.name_ref().map(|nr| nr.as_name()).unwrap_or_else(Name::missing); 674 let name = match e.field_access() {
675 Some(kind) => kind.as_name(),
676 _ => Name::missing(),
677 };
675 self.alloc_expr(Expr::Field { expr, name }, syntax_ptr) 678 self.alloc_expr(Expr::Field { expr, name }, syntax_ptr)
676 } 679 }
677 ast::ExprKind::TryExpr(e) => { 680 ast::ExprKind::TryExpr(e) => {