diff options
Diffstat (limited to 'crates/ra_hir_def/src/body/lower.rs')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index 0855c1d3a..9d6ee095e 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -106,7 +106,7 @@ impl ExprCollector<'_> { | |||
106 | fn alloc_expr(&mut self, expr: Expr, ptr: AstPtr<ast::Expr>) -> ExprId { | 106 | fn alloc_expr(&mut self, expr: Expr, ptr: AstPtr<ast::Expr>) -> ExprId { |
107 | let ptr = Either::Left(ptr); | 107 | let ptr = Either::Left(ptr); |
108 | let src = self.expander.to_source(ptr); | 108 | let src = self.expander.to_source(ptr); |
109 | let id = self.make_expr(expr, Ok(src)); | 109 | let id = self.make_expr(expr, Ok(src.clone())); |
110 | self.source_map.expr_map.insert(src, id); | 110 | self.source_map.expr_map.insert(src, id); |
111 | id | 111 | id |
112 | } | 112 | } |
@@ -118,7 +118,7 @@ impl ExprCollector<'_> { | |||
118 | fn alloc_expr_field_shorthand(&mut self, expr: Expr, ptr: AstPtr<ast::RecordField>) -> ExprId { | 118 | fn alloc_expr_field_shorthand(&mut self, expr: Expr, ptr: AstPtr<ast::RecordField>) -> ExprId { |
119 | let ptr = Either::Right(ptr); | 119 | let ptr = Either::Right(ptr); |
120 | let src = self.expander.to_source(ptr); | 120 | let src = self.expander.to_source(ptr); |
121 | let id = self.make_expr(expr, Ok(src)); | 121 | let id = self.make_expr(expr, Ok(src.clone())); |
122 | self.source_map.expr_map.insert(src, id); | 122 | self.source_map.expr_map.insert(src, id); |
123 | id | 123 | id |
124 | } | 124 | } |
@@ -136,7 +136,7 @@ impl ExprCollector<'_> { | |||
136 | 136 | ||
137 | fn alloc_pat(&mut self, pat: Pat, ptr: PatPtr) -> PatId { | 137 | fn alloc_pat(&mut self, pat: Pat, ptr: PatPtr) -> PatId { |
138 | let src = self.expander.to_source(ptr); | 138 | let src = self.expander.to_source(ptr); |
139 | let id = self.make_pat(pat, Ok(src)); | 139 | let id = self.make_pat(pat, Ok(src.clone())); |
140 | self.source_map.pat_map.insert(src, id); | 140 | self.source_map.pat_map.insert(src, id); |
141 | id | 141 | id |
142 | } | 142 | } |