diff options
Diffstat (limited to 'crates/ra_hir_def/src/body/lower.rs')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index 990761661..cc2532e88 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -101,7 +101,6 @@ impl ExprCollector<'_> { | |||
101 | } | 101 | } |
102 | 102 | ||
103 | fn alloc_expr(&mut self, expr: Expr, ptr: AstPtr<ast::Expr>) -> ExprId { | 103 | fn alloc_expr(&mut self, expr: Expr, ptr: AstPtr<ast::Expr>) -> ExprId { |
104 | let ptr = Either::Left(ptr); | ||
105 | let src = self.expander.to_source(ptr); | 104 | let src = self.expander.to_source(ptr); |
106 | let id = self.make_expr(expr, Ok(src.clone())); | 105 | let id = self.make_expr(expr, Ok(src.clone())); |
107 | self.source_map.expr_map.insert(src, id); | 106 | self.source_map.expr_map.insert(src, id); |
@@ -281,7 +280,7 @@ impl ExprCollector<'_> { | |||
281 | ast::Expr::ParenExpr(e) => { | 280 | ast::Expr::ParenExpr(e) => { |
282 | let inner = self.collect_expr_opt(e.expr()); | 281 | let inner = self.collect_expr_opt(e.expr()); |
283 | // make the paren expr point to the inner expression as well | 282 | // make the paren expr point to the inner expression as well |
284 | let src = self.expander.to_source(Either::Left(syntax_ptr)); | 283 | let src = self.expander.to_source(syntax_ptr); |
285 | self.source_map.expr_map.insert(src, inner); | 284 | self.source_map.expr_map.insert(src, inner); |
286 | inner | 285 | inner |
287 | } | 286 | } |