diff options
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r-- | crates/ra_hir_def/src/body.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/body.rs b/crates/ra_hir_def/src/body.rs index 2fe04db2b..d5f18b920 100644 --- a/crates/ra_hir_def/src/body.rs +++ b/crates/ra_hir_def/src/body.rs | |||
@@ -216,7 +216,7 @@ pub struct BodySourceMap { | |||
216 | expr_map_back: ArenaMap<ExprId, Result<ExprSource, SyntheticSyntax>>, | 216 | expr_map_back: ArenaMap<ExprId, Result<ExprSource, SyntheticSyntax>>, |
217 | pat_map: FxHashMap<PatSource, PatId>, | 217 | pat_map: FxHashMap<PatSource, PatId>, |
218 | pat_map_back: ArenaMap<PatId, Result<PatSource, SyntheticSyntax>>, | 218 | pat_map_back: ArenaMap<PatId, Result<PatSource, SyntheticSyntax>>, |
219 | field_map: FxHashMap<(ExprId, usize), InFile<AstPtr<ast::RecordField>>>, | 219 | field_map: FxHashMap<(ExprId, usize), InFile<AstPtr<ast::RecordExprField>>>, |
220 | expansions: FxHashMap<InFile<AstPtr<ast::MacroCall>>, HirFileId>, | 220 | expansions: FxHashMap<InFile<AstPtr<ast::MacroCall>>, HirFileId>, |
221 | } | 221 | } |
222 | 222 | ||
@@ -314,7 +314,7 @@ impl BodySourceMap { | |||
314 | self.pat_map.get(&src).cloned() | 314 | self.pat_map.get(&src).cloned() |
315 | } | 315 | } |
316 | 316 | ||
317 | pub fn field_syntax(&self, expr: ExprId, field: usize) -> InFile<AstPtr<ast::RecordField>> { | 317 | pub fn field_syntax(&self, expr: ExprId, field: usize) -> InFile<AstPtr<ast::RecordExprField>> { |
318 | self.field_map[&(expr, field)].clone() | 318 | self.field_map[&(expr, field)].clone() |
319 | } | 319 | } |
320 | } | 320 | } |
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index f463997e7..576342af9 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))) |